ARIA States & Properties
aria-valuetext
Provides meaningful text for a numeric range value when a number is not sufficient, such as a named size or temperature with units. Keep it synchronized with the real numeric value and localize the text. Value type: string. Accepted values: human-readable current value. Default or omitted behavior: none. Applicable context: supported range roles. Use only where allowed for the element’s implicit or explicit role. ARIA describes accessibility semantics; it does not automatically implement the associated behavior. Test with the relevant browser and assistive technology.
Formal Syntax & Structure
html syntaxhtml
aria-valuetext="20 degrees Celsius"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| aria-valuetext | string | Accepted values: human-readable current value. Default or omitted behavior: none. Context: supported range roles. Requiredness depends on the role. |
Working Example
Example Snippethtml
<label for="temp">Temperature</label><input id="temp" type="range" min="10" max="30" value="20" aria-valuetext="20 degrees Celsius" oninput="this.setAttribute('aria-valuetext',this.value+' degrees Celsius')">