fix: [M3-7477] - Fix accessibility on disabled SelectRegion menu items#9953
fix: [M3-7477] - Fix accessibility on disabled SelectRegion menu items#9953abailly-akamai merged 4 commits intolinode:developfrom
Conversation
jdamore-linode
left a comment
There was a problem hiding this comment.
Nice! Confirmed VoiceOver announces the "There may be limited capacity[...]" message when attempting to select Singapore. Tested in Chrome and Firefox!
c377aee to
9c133ab
Compare
|
Coverage Report: ❌ |
9c133ab to
0980da2
Compare
coliu-akamai
left a comment
There was a problem hiding this comment.
confirmed voiceover works for chrome + firefox! ✅
I was having issues with it on safari (including eventually getting a 'Safari not responding' for everything). Not sure how much we can do about it though - seems like it might just be known that voicoever doesn't always work on Safari?
Unrelated to this pr, but another interesting thing I noticed is that the regions weren't sorted alphabetically within their continents on Firefox (but they are on chrome/safari)

|
@coliu-akamai the safari voiceover issue isn't much of a concern to me but the sorting one on FF is odd so I'll make a ticket for it |
Description 📝
This PR addresses a bug/shortcoming of a disabled
<ListItem />within an<Autocomplete />.The problem is that MUI treats the
aria-disabledattribute in a list item as a non-focusable element.see: mui/material-ui#33603
It's particularly problematic in our case because we do expect to be able to convey to the impaired user the reason why an element is disabled, just like we do for any other user. One of the way to remedy this is to remove the
aria-disabledattribute and use adisabledone instead. Unfortunately in the case of a<li>element it is semantically wrong and not allowed.The approach taken in this PR is to reinstate focusability by removing the
aria-disabled(while preserving the onClick behaviors - or the lack thereof) and be extra verbose with the ListItem text. While not being the cleanest solution, it alows us to not break accessibility while waiting for MUI v6 or a proper fix to v5.Changes 🔄
Preview 📷
There is (or should be) no visual change introduced by this PR. The changes should be tested via VoiceOver or other related SR technology.
How to test 🧪
Prerequisites
DC Get Wellflag and MSW turned onReproduction steps
Verification steps
As an Author I have considered 🤔
Check all that apply