You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following accessibility related issues have been identified in Slider and RangeSlider:
🤔 Expected Behavior
<label> should always reference the input element for the first slider thumb using the for attribute, so that clicking the label will focus the slider input control.
Minimum/Maximum slider thumb inputs in a two thumb range slider are not be labelled as such using i18n, unless otherwise explicitly labelled.
Pressing the displayValue should focus the corresponding input.
For displayValue, use <output> with appropriate aria-labelledby, aria-live="off" and htmlFor referring to the corresponding input to label the output value segments.
Focused slider thumb should always be on top in the z-index order.
Update Slider (hooks) examples to implement labelling similar to how Slider and RangeSlider do and to pass text contrast requirements for the text labels.
😯 Current Behavior
<label> incorrectly references the container element with role="group" using the for attribute, so clicking the label fails to focus the slider input control.
Minimum/Maximum slider thumb inputs in a RangeSlider are not be labelled as such using i18n.
Pressing the display value does not focus the corresponding input.
Slider currently uses a role="textbox" with aria-readonly="true", which seems about as appropriate as output with aria-live="off", but output supports the htmlFor attribute making it easy to implement the focus on press behavior using an onPress event handler.
Slider thumb z-index order currently follows DOM order, so the last thumb is always on top regardless of the current focus, which gets confusing when thumbs overlap.
Slider hooks should implement label[htmlFor], output[htmlFor], make use of the localized minimum/maximum strings, and pass WAI-ARIA text contrast requirements.
🐛 Bug Report
Following accessibility related issues have been identified in Slider and RangeSlider:
🤔 Expected Behavior
<label>
should always reference theinput
element for the first slider thumb using thefor
attribute, so that clicking the label will focus the slider input control.displayValue
should focus the corresponding input.<output>
with appropriatearia-labelledby
,aria-live="off"
andhtmlFor
referring to the corresponding input to label the output value segments.😯 Current Behavior
<label>
incorrectly references the container element withrole="group"
using thefor
attribute, so clicking the label fails to focus the slider input control.role="textbox"
witharia-readonly="true"
, which seems about as appropriate asoutput
witharia-live="off"
, butoutput
supports thehtmlFor
attribute making it easy to implement the focus on press behavior using anonPress
event handler.label[htmlFor]
,output[htmlFor]
, make use of the localized minimum/maximum strings, and pass WAI-ARIA text contrast requirements.💁 Possible Solution
Suggested fixes have been implemented in #1148.
🌍 Your Environment
🧢 Your Company/Team
🕷 Tracking Issue (optional)
#1148
The text was updated successfully, but these errors were encountered: