-
-
Couldn't load subscription status.
- Fork 32.7k
Description
Similar to this issue material-components/material-web#1285
The slider doesn't work for users on touch devices while using AT (e.g. iOS/VoiceOver, Android/TalkBack). The ARIA makes it announce like a native
<input type="range">, and gives the hint to users that they can use gestures like "swipe up or down to change the value" (on iOS) / "use the volume buttons to change the value" (Android). However, as the slider can't actually intercept those (just yet anyway, until it uses Accessibility Object Model user action events https://wicg.github.io/aom/spec/#user-action-events), it is essentially broken for these users.
You can see this broken behavior on any of the sliders here https://material-ui.com/components/slider/#slider by visiting them with a mobile device while voice over is enabled.
- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
On iOS with VO enabled navigating to the slider reads "Swipe up or down with one finger to adjust the value", but for instance on the volume slider it just keeps reading "30%" "30%" and the value doesn't change.
Expected Behavior 🤔
The slider value should change as you "swipe up or down with one finger"
Steps to Reproduce 🕹
Either use this sandbox https://codesandbox.io/embed/material-ui-issue-forked-vn1f1?codemirror=1
Or any of the sliders on https://material-ui.com/components/slider/#slider
Steps:
- On a mobile/tablet device, with AT running, navigate to the Slider example
- Set focus to the slider (it should read "swipe up or down with one finger")
- Attempt to change the value by following the prompt given by the AT (e.g. "swipe up or down" / "use volume keys" depending on the specific OS/AT)
Context 🔦
I'm trying to get the slider to work for accessible users on ios and android
As the linked issue says:
The most robust way to make this universally work, currently, is to actually have a proper
<input type="range">which is either heavily styled, or which is being "piggy-backed" via CSS/JS. See https://codepen.io/patrickhlauke/pen/byWPMX for demo and explanation
Instead of the current implementation that uses a <input type="hidden"> combined with the role="slider" on a span.
Because of the warning here https://w3c.github.io/aria-practices/#slider
Warning
Users of touch-based assistive technologies may not be able to fully operate widgets that implement this pattern because APIs for capturing the necessary gestures and commands from assistive technologies are not yet available. Authors should fully test widgets using this pattern with assistive technologies before considering incorporation into production systems.
The apis are not available to support this version.
Your Environment 🌎
OS: iOS, Android
Browser: All
| Tech | Version |
|---|---|
| Material-UI | next |
| React | latest |
| Browser | ALL (iOS, Android) |
| TypeScript | N/A |
| etc. |