Skip to content

Add support for controlling tab order to FocusTrap #185

@StephenRiosDev

Description

@StephenRiosDev

Feature Description

Focus trap should provide a way to toggle explicit tab order control, where it uses its detected array of focusable elements in order to manually adjust the tab order for every press of the tab key.

Additional context

Due to browser limitations/bugs in Chrome and Firefox when using web components in a popover, FocusTrap needs a way to explicitly control the tab order.

Exit criteria (To be determined by the Auro team)

Instantiating a FocusTrap with a second argument for controlTabOrder results in the FocusTrap instance manually controlling the tab order.

Example:

this.focusTrap = new FocusTrap(
  this.container, // container
  true // controlTabOrder
)

controlTabOrder should be false by default if not passed.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions