-
Notifications
You must be signed in to change notification settings - Fork 842
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
remove menubar role from EuiSideNav #2429
Conversation
76d1020
to
57c8941
Compare
For the sake of my own edification, Is that statement generally correct @myasonik ? Just trying to better understand the 'broken semantics' reasoning. Thanks! |
I believe this is because we didn't implement the other roles & labels for menus, yes? https://www.w3.org/TR/wai-aria-practices/examples/menubar/menubar-1/menubar-1.html |
Looks like the correct keyboard controls aren't implemented, either (e.g., arrow key movement between items) |
Great question and thank you for asking! Strap in for a lot of words! Generally, I'll say that the recommendation is to avoid I highlighted "on the web" because these are desktop paradigms brought to the web, not "web native" ideas. These roles were created to recreate OS system menus (the ones that have "File", "Edit", etc.) and if that's not what you're recreating, they're probably not the right role to use. Looking at the OS menus, you'll see that they're predominantly filled with actions (not links) and there's generally a level of complexity to them (several layers of nesting, mixing actions and links next to each other, sometimes an inline action like the Help menu on Macs, etc). Because of all of those reasons, these roles have a lot of very prescriptive interaction patterns (take a look at all of the keyboard interactions required by the spec let alone what might actually be a good experience). But developers haven't been so great at implementing these to spec so screen readers and users of assistive tech have had to try to figure out what to do with these half-way implemented menus. So now we're in the kind of unfortunate state that OK, so we've got all of that from an industry perspective. But also looking specifically at our implementation, we have some confusion too. It's called And then looking at Kibana, I didn't look at every use of it but what I'd guess is the most common I'm rambling a bit now and this is getting really long so I want to close this out with two things:
I mostly haven't cited anything I've been saying here so if you want to read more about |
Thanks for the explanation, that makes sense and confirmed my (very basic) assumptions. |
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.
LGTM based upon Michail's explanation.
Summary
EuiSideNav
was making a promise that it couldn't keep. (Metaphor explainer: a customrole
is a promise that developer is making to the assistive tech on how something will work.) Better to ship a simpler structure that's not broken but could be better rather than ship broken semantics.EuiSideNav
can still be improved but this is a small, quick PR to make it just a bit better.Checklist
- [ ] Checked in dark mode- [ ] Checked in mobile- [ ] Checked in IE11 and Firefox- [ ] Props have proper autodocs- [ ] Added documentation examples