Tag
On this page
Implementation
- Ensure any interactive elements can be navigated to and interacted with via keyboard and other assistive technologies such as a screen reader
- Provide an aria-label if a tag group does not have a visible text category name
- Ensure a tag that contains a link has descriptive text content
Using color
As a caution, relying on color alone to communicate information causes barriers to access for many readers. Color vision deficient and low vision users may not be able to perceive color differences, and screen readers do not announce colors to non-sighted users.
Since a tag does not get an accessible name and is not focusable by default, each tag must have adequate contextual information provided in the surrounding layout or UI to convey the same information that color alone would convey. Designers and developers should consider using tags with icons instead of color alone or be sure that text within a tag is as descriptive as possible.
Compare Figure 1 to Figure 2. Both examples include blue, red, and green tags. In Figure 1, note how difficult it is to determine the differences between tags due to a lack of visual cues. In Figure 2, including icons and more descriptive text increases the amount of helpful information available without relying on color alone.
ARIA Authoring Practices Guide (APG)
Learn to use the accessibility semantics defined by the Accessible Rich Internet Application (ARIA) specification to create accessible web experiences.
Web Content Accessibility Guidelines
Understanding documents provide detailed explanations for Web Content Accessibility Guidelines (WCAG) guidelines and success criteria.
- SC 2.1.1 Keyboard (Level A)
- SC 2.1.3 Keyboard (no exception) (Level AAA)
- SC 2.4.3 Focus order (Level A)
- SC 2.5.5 Target size (Level AAA)
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.