Label
Examples
Web Component
Accessibility
Keyboard Navigation
| Key | Function |
|---|---|
Tab | Moves focus to the next interactive element. |
Shift + Tab | Moves focus to the previous interactive element. |
Enter,Space | Activates the associated input when a label is used with interactive elements. |
Esc | Closes any related tooltip or popover if applicable. |
For detailed keyboard interactions, refer to our Keyboard Control Guide.
Visit WebAIM for general keyboard techniques.
Explore live examples in the ARIA Practices Guide.
Resources
- MDN Label Documentation: Learn more about correct label implementation in HTML.
- W3C Label Techniques: Implementation best practices for accessible labels in WCAG.
- WAI-ARIA Tooltip Example: Best practices for popovers and tooltips.
Other recommendations
Find additional accessibility tips in our Accessibility Guide.
WCAG 2.2 Guidelines
- Non-text Content: All non-text content that is presented to the user has a text alternative that serves the equivalent purpose. (Level A)
- Info and Relationships: Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text. (Level A)
- Headings and Labels: Headings and labels describe topic or purpose. (Level AA)
- Labels or Instructions: Labels or instructions are provided when content requires user input. (Level A)
- Name, Role, Value: For all user interface components (including but not limited to: form elements, links and components generated by scripts), the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to user agents, including assistive technologies. (Level A)