-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Slider does not generate a useful ARIA label #366
Comments
@ThomasBurleson @ajoslin any input on how to handle this slider labeling issue? Should we require developers to include a label? |
Here is a snippet of slider used in our own demos: <h3> Rating: {{rating}}/5 </h3>
<material-slider
discrete
aria-label="rating"
ng-model="rating" step="1" min="1" max="5" >
</material-slider> Personally, adding a If we offered a <h3> Rating: {{rating}}/5 </h3> was not needed. I wonder if we simply [and only] warn of a missing <h3> Rating: {{rating}}/5 </h3>
<material-slider discrete
aria-label="Rating {{rating}} of 5"
ng-model="rating" step="1" min="1" max="5" >
</material-slider> |
So, depending on the component, we don't copy |
Well for |
When using
$materialAria.expect()
to handle labeling of thematerial-slider
component, unless developers provide a customaria-label
attribute themselves (and few will), no useful label is generated nor is a warning logged to alert the developer. For example: becausematerial-slider
injects a model value like70
as text,$materialAria.expect()
copies that text into anaria-label
, but that is not a useful label for a slider.See
aria-label="70"
and the highlightedspan
(child node):Expected behavior:
aria-label
, so a warning is logged telling them to do so.aria-label
and the purpose of the component is clearly communicated to AT users. Useful labels would be "Volume" or "Rating 2/5"Related PR: #344
The text was updated successfully, but these errors were encountered: