-
-
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
Navigation: Improve accessibility (#4651, #4755, #4756) #8684
Navigation: Improve accessibility (#4651, #4755, #4756) #8684
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #8684 +/- ##
==========================================
+ Coverage 89.82% 90.10% +0.27%
==========================================
Files 412 418 +6
Lines 11878 12028 +150
Branches 2364 2369 +5
==========================================
+ Hits 10670 10838 +168
+ Misses 681 658 -23
- Partials 527 532 +5 ☔ View full report in Codecov by Sentry. |
FYI @ScarletKuro @henon! These changes should work with #8672. I made @ScarletKuro I changed the |
Looks ok, as I understand it's optional and it doesn't break existing code and doesn't change how the Localizer is behaving. |
@igotinfected please use |
My bad, thanks for catching that (and in one of my other comments too), I'm on Azure DevOps at work where you have to use |
@igotinfected Thanks. For this we don't need to add anything to the v7 migration guide right? |
@henon nope should be transparent! |
Description
Implemented accessibility recommendations for
MudNavGroup
,MudNavMenu
, andMudNavLink
.The main goal of this PR is to improve/fix keyboard navigation in navigation blocks and to address the issues linked below.
I introduced a
NavigationContext
that allows passing state down a navigation group chain which allows us to figure out whether buttons/links at a specific level of the chain should be focusable via keyboard navigation.Usage of
tabindex
,aria-label
,aria-expanded
,aria-hidden
,aria-controls
attributes should now be better (but not necessarily perfect).I also had to change the
Localizer
API to accept arguments which can be quite useful (passing a value to a longer translation to include it in a certain position for example).Fixes #4651
Resolves #4756 (original issue is fixed/improved but implementation differs from request)
Fixes #4755
How Has This Been Tested?
Visually + unit tests.
Types of changes
NavMenu Sub Groups example comparison
chrome_E1b0GaRbDx.mp4
MudBlazor docs navigation comparison
chrome_aVp2Q3o3LD.mp4
Checklist
dev
).