role switch should have additional attribute aria-valuetext #574
Labels
feature
may add new concept(s) to ARIA which will require implementations or APG changes
Milestone
The values on/off are not sufficient for role switch since often on switches are two text items that have the character of "labels" ("red" and "green" for instance) that stand for two discrete "values".
We need an additional aria-valuetext attribute (like aria-valuetext for slider) that reflects this in string format. Declaration of this attribute can add to the default on/off announcement or replaces it entirely, if declared.
Of course the text value must be updated on state changes.
Additional labelling using aria-label and/or aria-labelledby should still be possible, also aria-describedby.
You cannot use aria-labelledby for this additional value text since screen readers typically poll only for toggle change events of object type boolean, accessing changed labels is additional workload typically not done. For this they should additionally listen to control value changes if it comes to switch role.
This requires that switch role also supports a value pattern. State changes must be mapped as changed control values with content=valuetext in respective valuechange events of the user agent.
The text was updated successfully, but these errors were encountered: