aria-meter-name
Rule Severity : Serious
Description
The aria-meter-name rule ensures that elements with role="meter", or native <meter> elements, have an accessible name. A meter conveys a scalar value within a known range (for example, disk usage or battery level). Without an accessible name, screen reader users hear only the numeric values without knowing what those values represent.
This rule meets WCAG requirements by:
- Providing Programmatic Names (WCAG 4.1.2 Name, Role, Value): It ensures that the name of every meter element can be programmatically determined, so assistive technologies can communicate both what is being measured and its current value.
- Conveying Information and Relationships (WCAG 1.3.1 Info and Relationships): It ensures the relationship between a meter control and its visible label is exposed to assistive technologies, not merely conveyed through visual proximity.
To comply with this rule, every meter element must have an accessible name provided via a <label> element, aria-label, or aria-labelledby.
Examples
This example shows a custom meter element with numeric values but no accessible name. A screen reader announces the values without context, leaving users uncertain about what is being measured.
Adding an aria-label to the meter element lets screen readers announce “Disk usage, 72 percent”.
How to fix?
To fix violations of the aria-meter-name rule, follow these steps:
-
For native
<meter>elements, associate a visible<label>element using matchingforandidattributes. -
For custom elements using
role="meter", add anaria-labelattribute with a concise description of what the meter measures. -
If a visible label for the meter already exists on the page, use
aria-labelledbyon the meter element to reference that label’sid.
Reference
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!