Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add context to no-noninteractive-tabindex on when this might be valid #717

Closed
backwardok opened this issue Jun 25, 2020 · 3 comments · Fixed by #760
Closed

Add context to no-noninteractive-tabindex on when this might be valid #717

backwardok opened this issue Jun 25, 2020 · 3 comments · Fixed by #760
Assignees

Comments

@backwardok
Copy link
Collaborator

There's a use case for adding tabindex="0" to a generic container (like a <div>) to add keyboard accessibility to a scrollable container. Without the tabindex attribute, if the scrollable container doesn't contain any interactive elements, you won't be able to scroll that content with a keyboard.

Since there's no role associated with this, there isn't really anything to key off of to determine that this shouldn't be checked. The only current workaround for this is to disable the rule for that line.

@backwardok
Copy link
Collaborator Author

BTW I thought about adding something to this when I was updating all the docs today, but I wasn't super sure what the recommendation should be.

@kr8n3r
Copy link

kr8n3r commented Aug 28, 2020

yep, long code block wrapped in pre. tabindexgoes on thepre` element

@eps1lon
Copy link
Contributor

eps1lon commented Dec 1, 2020

PR up over at #760.

ljharb pushed a commit to eps1lon/eslint-plugin-jsx-a11y that referenced this issue Dec 27, 2020
@ljharb ljharb closed this as completed in 066ccff Dec 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants