Open jelbourn opened 3 years ago
Hi @jelbourn ! I would like to work on this issue. Can I take it up if no one is working on it?
@noobyogi0010 this is open for contribution if you want to put together a proof-of-concept PR. Do you have access to the various screen-readers mentioned in the original issue for verification?
@jelbourn This seems really trivial to implement, but I don't have any screen readers set up. Would it make sense for me to implement this and get Zach to test & review the PR?
@wagnermaciel yeah, this would be a good collaboration for you and @zarend to work together and prototype / test this approach. If we find that the approach works well, we can raise it to the Material Web team and see if they want to use it too, or if we should just do it ourselves.
kksg, @wagnermaciel we can talk more offline in January
Hi @jelbourn,
We looked into list/listitem, and here's what we initially came up with. In theory, it might make sense to wrap the two sliders in a list. That way it's semantically communicated that the two are connected.
assistive technology will announce indices for the sliders as well as the label for the entire range slider as well
We definitely want to confirm that AT reads an appropriate label for both the start and end slider. "announce indices" – I don't want to go as far as dictating behavior to the AT because that can cause unintended consequences. Wrapping patterns in another pattern works well for patterns that truly are compound, such as list or menu. AFAIK slider role is not specified as being part of a parent or any kind of compound widget.
App developers could always add role="group"
to the <mat-slider/>
if they are of that opinion that it works better for their application. Group is less specific than list.
I definitely recommend we implement aria-valuemin and aria-valuemax as recommended by the ARIA Author Practices Guide Slider (Multi-Thumb) pattern. That way the assistive technology would get the information it needs from the start thumb when focused on the end-thumb and visa versa.
Implementing aria-valuemin and aria-valuemax seems like a definitely improvement to me. Would you like us to continue to look into using the list/listitem pattern?
-Zach
I think that wrapping the thumbs in a list is a nice-to-have improvement, but not super high priority until we've dealt with bugs/problems on other components (including tree)
Sg, I looked at our range slider, and we're already following the recommendations from ARIA Author Practices Guide Slider (Multi-Thumb) pattern 👍
Currently the range slider presents itself as two independent slider controls. If we were to make the
mat-slider
elementrole="list"
and wrap each<input>
element in arole="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 likeThe non-listitem children of
role="list"
need to be givenaria-hidden
to prevent them as counting as list items.The work here would be