aria-valuetextaria-valuetext lets a range-type control (such as a slider, spinbutton, or progress bar) announce a human-readable value instead of the raw number. Both examples below use the native <progress> element, which has an implicit role of progressbar and supports this attribute.
aria-valuetextThis progress bar has no aria-valuetext, so its value should be announced using the numeric value computed from value and max.
Expected result: the accessible value should be announced as a number or percentage (e.g. "75 percent"), derived from value="75" and max="100".
<label for="volume1">Volume level</label>
<progress id="volume1" value="75" max="100">75%</progress>
aria-valuetextThis progress bar has the same underlying value as Example 1, but adds aria-valuetext. The custom text should override the numeric announcement.
Expected result: according to the ARIA specification, the accessible value should be presented as “Loud” instead of the number or percentage value.
“If
aria-valuetextis specified, assistive technologies SHOULD render that value instead of the value ofaria-valuenow.”
<label for="volume2">Volume level</label>
<progress
id="volume2"
value="75"
max="100"
aria-valuetext="Loud"
>75%</progress>
role="progressbar" with aria-valuenowExamples 1 and 2 use the native <progress> element, where the browser computes the accessible value from the value and max attributes. This example instead uses a custom widget built from a <div> with role="progressbar", where aria-valuenow, aria-valuemin, and aria-valuemax are authored directly. This isolates whether assistive technology handles aria-valuetext differently for native elements versus custom ARIA widgets.
Expected result: as with Example 2, the accessible value should be presented as “Loud” instead of the number or percentage value. Comparing results here against Example 2 shows whether a valuetext bug is specific to native elements, or applies to ARIA valuetext handling more broadly.
<span id="volume3-label">Volume level</span>
<div
role="progressbar"
aria-labelledby="volume3-label"
aria-valuemin="0"
aria-valuemax="100"
aria-valuenow="75"
aria-valuetext="Loud"
></div>