-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
MudNavMenu: Use nav
instead of div
for better accessibility
#8674
MudNavMenu: Use nav
instead of div
for better accessibility
#8674
Conversation
@bunkaisatori @zola-25 this change will "fix" the doc examples, can you confirm |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #8674 +/- ##
==========================================
+ Coverage 89.82% 90.03% +0.20%
==========================================
Files 412 418 +6
Lines 11878 12006 +128
Branches 2364 2366 +2
==========================================
+ Hits 10670 10810 +140
+ Misses 681 661 -20
- Partials 527 535 +8 ☔ View full report in Codecov by Sentry. |
Should this be done to the docs footer as well? |
Ideally the docs should use https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/ All navigation blocks (in the docs there can be 4 navigation blocks at once I think) should either be surrounded by a
|
Maybe @KamilBugnoKrk could help too. That person contributed a lot in accessibility in past. (there is also a blog post https://blog.kamilbugno.com/web-accessibility). But if I read the blogpost correctly, the |
@KamilBugnoKrk would you lend us your expertise on accessibility please? Would be greatly appreciated. Edit: Haha, @ScarletKuro we thing alike :) |
Yes, this was a problem too, probably more significant. As you've already mentioned, the work around involved passing I think the main thing to make sure with Stackoverflow best-html5-markup-for-sidebar It also gets confusing when it is used in responsive sidebars. Since, when collapsed, the drawer/sidebar doesn't set any styles like An And from Region WAI ARIA:
Does any of this matter?Are screen readers adaptable given such variations across the web? I have no idea. Tools like Axe and Lighthouse don't complain about MudBlazor's use of I set
That's about all the info I've got. Hope it helps in some way. But aside from these semantic HTML/ARIA issues, would just like to say thanks for this awesome library and the work you put into it. 👍💪 A few months ago I finished my hobby project with it: https://demo.explainmyenergy.net |
@zola-25 thank you for the super detailed response!! I've started working on accessibility in navigation that goes beyond this issue here: #8684 That on its own should solve a few accessibility issues including keyboard navigation. In that implementation I put the The collapsible navigation groups are now also marked as This will most likely be an iterative process anyway given how much there is to do and how little documentation there is on accessibility from an implementation point of view.
I am happy we have dedicated test engineers for this at my work place, it seems like a pretty complicated topic. |
I assume this one is safe to merge @henon |
@zola-25 If you want you can add your project to our show-and-tell-issue: #2849 |
nav
instead of div
nav
instead of div
for better accessibility
Thanks Jason |
Description
Fixes: #7222
The original issue requested an override on
MudDrawer
for theaside
tag. However, according to MDN (and other frameworks), having navigation blocks inside ofaside
is not an issue, but navigation blocks should always be inside of anav
tag. The logical solution for me then is to haveMudNavMenu
translate intonav
rather thandiv
.How Has This Been Tested?
Visually tested and confirmed with other major accessibility focused sites:
Drawer documentation post-fix:
MDN:
Types of changes
Potentially breaking if users expect a
div
tag inMudNavMenu
and have custom styling around that expectation.Checklist
dev
).