Counter
Considerations for designers & developers
- Counter text should be clear and concise.
- If you're using
Counter
on a colored or dark background, make sure that it has enough contrast against the background. - Include counters in the reading order so screen readers can access it.
- Counters aren't interactive, so they don't have to be in the keyboard focus (tab) order.
- You can use
ScreenReaderOnly
component for screen readers to announce counter value along with some accompanying text. Refer to the example for more details. - Avoid using
aria-label
andaria-labelledby
attributes on noninteractive text, that is, onspan
anddiv
elements without an interactive role.
Other recommendations
See more accessibility recommendations in the common Accessibility guide.