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

Accessibility bug: scrollable code blocks on website are not operable with a keyboard #2828

Closed
ashleemboyer opened this issue Nov 2, 2023 · 1 comment

Comments

@ashleemboyer
Copy link

On pages like Menu (Dropdown) where there are code blocks that can scroll vertically and horizontally, there is no way for keyboard-only users to scroll those areas and view all of the content in them.

This issue falls under WCAG 2.1 Success Criterion 2.1.1 Keyboard (Level A). It can be fixed by adding the tabindex="0" property to the scrollable regions. This will enable the region to be reachable via keyboard, and then the arrow keys can be used to scroll the content.

Here is a screenshot from the top of the linked page showing a code block that scrolls in both directions:

@reinink
Copy link
Member

reinink commented Nov 10, 2023

Hey thanks for this suggestion as well, I've added tabindex="0" to the code block, and now I am able to access it using voiceover on MacOS 👍

image

@reinink reinink closed this as completed Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants