MudFocusTrap, MudFlexBreak, MudIcon, MudSpacer: Improve accessibility#9007
MudFocusTrap, MudFlexBreak, MudIcon, MudSpacer: Improve accessibility#9007henon merged 2 commits intoMudBlazor:devfrom
Conversation
FocusTrap: - Added aria-hidden="true" to elements that should be ignored by screen readers (e.g., bumpers and fallback divs) FlexBreak - Added aria-hidden="true" Grid: - Use the role="grid" attribute to define it as a grid layout. This makes it easier for assistive technologies to understand the structure of the content. Item: - Use the role="gridcell" attribute to indicate that it is a cell within the grid. Icon: - Add aria-hidden="true" and role="img" to the secondary span like the first - Moved @attributes="UserAttributes" to the ends so the user can override all attributes Spacer - Added aria-hidden="true"
|
@igotinfected These I'm less sure about, what do you think? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #9007 +/- ##
==========================================
+ Coverage 89.82% 90.51% +0.68%
==========================================
Files 412 394 -18
Lines 11878 12139 +261
Branches 2364 2369 +5
==========================================
+ Hits 10670 10988 +318
+ Misses 681 620 -61
- Partials 527 531 +4 ☔ View full report in Codecov by Sentry. |
The only thing I'm unsure about is There seem to be ongoing discussions (linked issues go into more detail) about clarifying the use of Though the one thing currently that speaks against using The keyboard behaviour as defined could be considered as breaking depending on how it's implemented. One of our applications at work for example uses |
|
Thanks @igotinfected, I reverted MudGrid and MudItem and will circle back round in the future. Do you still want to be pinged on these PRs? I'll be making several more hopefully. @henon Should be ready to go |
|
@danielchalmers feel free if you want a second opinion, I'm in the learning stage on accessibility just like you :) |
|
Thanks! |
Reverts parts of MudBlazor#9007 > The problem is: Removing a focusable element like a link from the accessibility tree does not remove it from tab order. A screen reader user tabbing through the website will arrive at the link and hear “empty” or something similar. Please, don't do this! Going to err on the side of caution because it's easy to make accessibility worse unintentionally. https://oidaisdes.org/common-aria-mistakes.en/
Description
Part of a series in #8901. Reminder: I'm not an expert.
FocusTrap:
FlexBreak
Icon:
Spacer
How Has This Been Tested?
Type of Changes
Checklist
dev).