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: Keyboard focus is not coming on the horizontal scrollbar of Request and Response Samples #2619

Open
arlina-espinoza opened this issue Nov 19, 2024 · 0 comments

Comments

@arlina-espinoza
Copy link

Describe the bug
When the request or response sample text overflows the width of the container, a horizontal scrollbar appears.
If the request/response does not contains a "focusable" element, then the user can't use the left and right arrow keys to view the rest of the code in that section.

Expected behavior
If the request/response sections present a scrollbar, they should be keyboard accessible.

How to reproduce

  1. On Chrome (not sure about other browsers).
  2. Go to example page, POST Buy museum tickets method: https://redocly.github.io/redoc/#tag/Tickets/operation/buyMuseumTickets
  3. Resize browser window to a small width, so that the "Request samples" of the method shows a horizontal scrollbar.
  4. Try tabbing to get to the "Request samples" and use right/left arrow keys to focus. It is not possible.

Screenshots
Image

Additional context
For this bug, the request/response text does not need to have any focusable elements (like JSON expand/collapse buttons). The method referred in "how to reproduce" is an example that should display the bug.

Solution
Add tabindex="0" to the element that has the scrollbar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant