Skip to content

target-size rule should flag tabindex=-1 widgets for review #3695

@WilcoFiers

Description

@WilcoFiers

Elements with tabindex="-1" are tricky in the target-size rule. Patterns like tab bars use tabindex="-1" on inactive tabs. These are still click targets, but to get to them with keyboard, arrow navigation is used instead of tab. On the other hand there are examples where tabindex="-1" is used for disabled / inactive components.

It's impossible to definitively know if tabindex="-1" means a component won't respond to a click event. I think the only safe thing to to is to flag them for review. The only exception I think is if the control with tabindex="-1" is a descendant of some other focusable control. This was tackled in #3682

Metadata

Metadata

Assignees

Labels

fixBug fixesprA pr has been created for the issuetarget-size

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions