-
Notifications
You must be signed in to change notification settings - Fork 221
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
fix: Example Body Content Overflow with support for keyboard scroll #2225
Conversation
Added tabindex to the scrollable area of this example.
1 flaky tests on run #5762 ↗︎
Details:
cypress/integration/Autocomplete.spec.ts • 1 flaky testThis comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
I'm wondering if this be the default and always add tabIndex 0 to the body instead of in the example? |
I thought a little bit about that too, but I only want the Modal.Body to be keyboard focusable when the content overflows like in this example. The Basic example is great as-is, and I don't want to focus body content there. Maybe the move is to support a new boolean prop for Modal.Body for consumers? |
I think this is where a great call out in the documentation would exists saying if you need focus and have scrollable content, use this tabIndex. I agree that the example as is is good for now |
Added tabindex to the scrollable area of this example.
Summary
Fixes: #2222
Keyboard accessibility: the scrollable area in the Body Content Overflow example of a modal could not be scrolled up/down using the keyboard only.
Release Category
Component Examples
Release Note
Adding tabIndex 0 to Modal.Body will allow for content to be accessible and scrollable if the content overflows
Checklist
ready for review
has been added to PRFor the Reviewer
Where Should the Reviewer Start?
Areas for Feedback? (optional)
Testing Manually
Screenshots or GIFs (if applicable)
This should not have much affect on the UI. There will be a visible focus border displayed around the scrollable area.
Thank You Gif (optional)