Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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] Uses the arrow keys for tab bar navigation #612
[accessibility] Uses the arrow keys for tab bar navigation #612
Changes from 4 commits
12a181b
306e71a
37810b6
ddcad85
6033487
8ab2fa5
49796cd
6571ef1
9d395d8
2bb3466
705b918
ce2b280
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Should the event being stopped even if there is only one element?
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.
I thinks so, to avoid different behavior depending on the number of elements.
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.
In case this it is undefined should it be set to some default value?
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.
Having
tabindex="-1"
as default would probably make sense for a tab.I'm not quite sure about the difference between
tabindex="-1"
and tabindex not set.It seems that the behavior is not the same for input elements and other elements.
In the case of the tab, not setting the
tabindex
would make it not focusable with tabulation, nor 'programatically'. I'm not sure how useful it can be...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.
when
tabindex
is not defined, interactive elements automatically receive tab focus, while non-interactive elements don't. so if you wan't to avoid a tab on an interactive widget you'd usetabindex=-1
. if you want to add a non-interactive dom element to the tab order then you'd usetabindex=0
.the ARIA authoring guide example for this pattern uses
button
s for the tab element which means they need control what doesn't get tabbed to; the implementation needs to choose one tab element to havetabindex=0
, or undefined, and the rest aretabindex=-1
. if the tab elements are made of non-interactive elements then the task is to make elements appear in the dom order by addingtabindex=0
to one element.hopefully folks don't mess with tab order. that should be private. most recommendations say to avoid
tabindex>0
.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.
fixed in 9d395d8