-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Focus ring now shows up around custom navigation buttons #1563
Focus ring now shows up around custom navigation buttons #1563
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good; worth a regression test?
@ljharb How would I add regression tests for this? |
Hmm, that's a fair point. As for a test, I'd assume we could provide one test that uses default buttons, and asserts the tabIndex is present, and another that uses custom ones, and asserts that it's not? Even better would be adding those test cases to master first, and then updating them in this PR, which would make the breakage very clear. |
@ljharb Would it be possible to check in |
Not reliably, no - all we can do is render what they give us. |
0c0b0e7
to
a84e51a
Compare
@ljharb do the test changes look good to you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
This PR fixes an issue where when custom navigation buttons are provided, the focus ring for keyboard-only users did not appear around the custom buttons. This issue is fixed by only supplying a
tabindex
when the default navigation buttons are used. This means that in order for custom navigation buttons to receive keyboard focus atabindex
must be specified on the object passed in.Before
After