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
Improve the menubar accessibility #465
Improve the menubar accessibility #465
Changes from 8 commits
601c14b
41bcc6f
29d2e8b
4231171
588348d
ad90278
fc2c5f9
f4d6525
0720b26
4fe3e21
480267b
8eb88b2
44fe991
0a5ebb4
8e6551e
ff5d5f1
cdc8143
7ef2870
acac897
89c792a
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.
Could you add some more prose explaining the inclusion of the textarea on the page? I'm afraid that in the future without a better explanation, it's not going to be quite clear why the textarea is on the page, or what purpose it serves.
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'll add a comment. It is basically there so that there is some content that can be tabbed to. Otherwise the tab out of the menubar takes you into the browser UI and that can often be a bit harder to see where it has gone (I guess an a11y issue in itself).
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.
Sorry, even with the comment I'm still not quite sure I get what this line is doing.
I thought if it's not resetting the
activeIndex
, then I should be able to do the following on the example page:Tab
to the menu barShift
+Tab
and...Expected behavior: "Edit" remains highlighted and if I press
Enter
it should open the Edit menu.Actual behavior: the File menu items becomes highlighted and if I press
Enter
it opens the File menu.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.
Why do we wish to reset the active menu item when the menu bar receives focus?
I would like to make the Lumino menubar behave more like the example menubar in the ARIA Authoring Practices Guide.
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.
This is caused by the interpretation of what it means for the "menubar to receive focus", as I put in the main reply. I'll switch to the interpretation used in the example, which will also make the code much simpler.
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 think this description was meant for a different variable?
focusable
is a boolean, not an index.While we're at it, could we rename this variable? To be, focusable means "able to be focussed" but I think what this variable really means is more like "should be made focusable" (by setting
tabindex
to 0).What do we think about
makeFocusable
orenableFocus
orenableTabIndex
or...?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.
Not sure I understand this change.
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.
Only one of the menuitems should be focusable using the tab key (tabindex="0") and following the spec, the first menuitem is set to that and all of the others are set to be focusable via code (tabindex="-1"). In the future, if we want to have the tab key return to the last selected menuitem, then this will need changing to do that.