jsx-eslint / eslint-plugin-jsx-a11y

Static AST checker for a11y rules on JSX elements.
MIT License
3.41k stars 635 forks source link

should interactive-role-supports-focus skip role=option? #935

Closed ckundo closed 1 year ago

ckundo commented 1 year ago

We have a role=listbox with role=option children. those options are failing on interactive-role-supports-focus. We're getting around this by applying tabindex=-1, which I think is actually correct, but wanted to gut check since APG does not use tabindex for their listbox example (I know APG is reference implemenation, but still makes me doubt the tabindex=-1... thoughts?

edit: if tabindex=-1 is not correct, consider skipping option for the rule?

jessebeach commented 1 year ago

@ckundo are you using a roving tabindex pattern?

ckundo commented 1 year ago

@jessebeach hi! we aren't now, we're handling arrow keys though. Trying to be low touch here, and hopefully set the stage for roving tabindex.

ckundo commented 1 year ago

@jessebeach decided to just fix this instance to use roving tabindex 😅

jessebeach commented 1 year ago

🙏