-
-
Notifications
You must be signed in to change notification settings - Fork 805
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
<sl-menu>
and <sl-menu-item>
regression in 2.0.0-beta.79
caused by allowing focus on disabled items for improved accessibility
#845
Comments
web / vscode.dev
Pointer focus is also not possible for disabled items. |
web components / Adobe Spectrum
Pointer focus is also not possible for disabled items. |
Vaadin: https://vaadin.com/docs/latest/components/menu-bar/#disabled-items (focus not possible via keyboard and pointer.) |
This wasn't sitting right with me either. I've always heard and read — although I can't find the W3 site that says it at the moment — that disabled items should be focusable contrary to what operating systems and even form controls in the browser do. This is inconsistent, as demonstrated here: https://jsfiddle.net/8rh9o7ut/ I've also been in the room for multiple arguments about whether form controls should ever even be disabled, which seems to be more of a tabs vs. spaces-style discussion. I did some more reading on this and reverted my opinion with one condition that I've outlined in the contribution guidelines, (emphasis mine):
The bottom line is, sighted users expect disabled items to be skipped. This behavior saves keypresses and maintains consistency with operating system menus, form controls, etc. Additionally, disabled items are still discoverable by screen readers when using modifier keys (a common way to navigate HTML documents). In this video, I arrow through the menu items twice. The first time, using Up|Down. The second time, using Control + Option + Left|Right. This is the convention Shoelace will stick with unless there's definitive proof that this approach is wrong, harmful, or inaccessible to users. keyboard.mp4 |
<sl-menu>
and <sl-menu-item>
by allowing focus on disabled items causes regression
<sl-menu>
and <sl-menu-item>
by allowing focus on disabled items causes regression<sl-menu>
and <sl-menu-item>
regression caused by allowing focus on disabled items for improved accessibility
<sl-menu>
and <sl-menu-item>
regression caused by allowing focus on disabled items for improved accessibility<sl-menu>
and <sl-menu-item>
regression in 2.0.0-beta.79
caused by allowing focus on disabled items for improved accessibility
Describe the bug
Disabled (and also not displayed (
CSS
:display: none
)) menu items allow focus (via keyboard o__O and mouse).This weird behavior introduced in
2.0.0-beta.79
potentially for project-internal consistency runs contrary to all established expectations.No other desktop/web app allows focus on disabled menu items (even when these are still displayed) via keyboard or pointer.
Please see examples below. I can add dozens more to convince you to revert this regression.
@claviska
The text was updated successfully, but these errors were encountered: