Open
Description
Currently the range slider presents itself as two independent slider controls. If we were to make the mat-slider
element role="list"
and wrap each <input>
element in a role="listitem"
, assistive technology will announce indices for the sliders as well as the label for the entire range slider as well. The rendered result would look something like
<mat-slider role="list" aria-label="...">
<div role="listitem"><input type="range" aria-label="..."></div>
<div role="listitem"><input type="range" aria-label="..."></div>
<div class="mdc-slider__track" aria-hidden="true">...</div>
<mat-slider-visual-thumb aria-hidden="true">...</mat-slider-visual-thumb>
<mat-slider-visual-thumb aria-hidden="true">...</mat-slider-visual-thumb>
</mat-slider>
The non-listitem children of role="list"
need to be given aria-hidden
to prevent them as counting as list items.
The work here would be
- Create a proof of concept
- Test the proof of concept in all screen-readers that we support
- ChromeVox
- NVDA
- JAWS
- VoiceOver
- TalkBalk
- Make the change
- Update documentation for best practices