Skip to content

query/focusable should be able to provide only-tabbable elements as well #100

@rodneyrehm

Description

@rodneyrehm

The following methods ignore elements that are keyboard-focusable but not script-focusable. While this is the expected use case, considering these methods are for scripting, there is currently no way to identify all tabbable elements, e.g. to visually mark them as such.

To allow both uses a new option includeOnlyTabbable: true should be added to the following modules:

  • query/first-tabbable
  • query/focusable
  • query/tabbable
  • query/tabsequence

The effect of this option should be to disengage the isOnlyTabbable() constraint in is/focusable. As all elements passing is/only-tabbable must already pass is/focus-relevant, no further change should be necessary.

In #80 the cores of is/focus-relevant and is/tabbable were refactored to allow specifying options, while maintaining the function signatures - the same should be done to is/focusable.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions