ui5/webcomponents/accessibility
Claude Code and agent skill by ui5/webcomponents
- community
Checking that the SKILL.md file is still in the repository.
How to make UI5 Web Components applications accessible. Covers accessibility APIs (accessibleName, accessibleNameRef, accessibleDescription, accessibleRole, accessibilityAttributes), label-input relationships, invisible messaging, keyboard handling, high contrast themes, and screen reader support. Use when the user asks about ARIA attributes, screen readers, keyboard navigation, accessibility properties, or making their app accessible.
Install
npx vskill@latest install ui5/webcomponents/accessibilitySKILL.md
Accessibility in UI5 Web Components
UI5 Web Components have built-in accessibility: ARIA roles, keyboard navigation, screen reader support, and high contrast themes are handled automatically in the shadow DOM. Applications should use the accessibility APIs described here to provide additional context that only the app can know (labels, descriptions, relationships).
Built-in Accessibility (No App Code Needed)
Components automatically provide:
- ARIA roles and attributes mapped in the shadow DOM (e.g.,
ui5-comboboxrendersrole="combobox"internally) - Keyboard navigation within complex components (arrow keys in lists, tables, date pickers, etc.)
- Focus management with visible focus indicators
- State mapping —
disabled,readonly,required,checkedare automatically mapped to their ARIA equivalents (aria-disabled,aria-readonly,aria-required,aria-checked)
Accessibility APIs
Use these properties to enrich the accessibility context for your application.
accessibleName
Maps to aria-label. Provides a text alternative when the visual label is insufficient or absent.
Use accessibleName when there is no visible text label, for example icon-only buttons or inputs without a <ui5-label>.
accessibleNameRef
Alternative to aria-labelledby that works across shadow DOM boundaries. Takes one or more IDs of elements whose text content serves as the label.
Prefer accessibleNameRef over accessibleName when a visible label exists — this keeps the label and the ARIA text in sync automatically.
accessibleDescription / accessibleDescriptionRef
Maps to aria-description. Provides additional descriptive text beyond the label.
accessibleRole
Overrides the default ARIA role of a component.
Only change the role when the component is used in a non-standard way (e.g., a List used as a menu).
accessibilityAttributes
An object that sets additional ARIA attributes on the component's root element. Use for aria-expanded, aria-haspopup, aria-controls, and similar relationship attributes.
For composite components like ui5-shellbar, the object contains nested objects for different internal elements — check the component's API docs.
Label-Input Relationships
Due to shadow DOM, standard HTML <label for="..."> does not work with custom elements. Use these patterns instead:
Using Label's `for` property (preferred for forms):
The for property connects the label to the input. Clicking the label focuses the input. Setting required on the label shows an asterisk; setting required on the input sets aria-required.
Using `accessibleNameRef`:
Headings and Semantic Levels
Use the level property on ui5-title and header-level on ui5-panel to set the correct heading level for the document outline.
Screen readers use heading levels to build a page outline. Skipping levels (e.g., H1 to H4) is an accessibility violation.
Icon Accessibility
The ui5-icon component has a mode property that controls its accessible behavior:
| Mode | Behavior | Use when | |
|---|---|---|---|
Image (default) | role="img" | Icon conveys meaning (needs accessible-name) | |
Interactive | role="button", focusable | Icon is clickable | |
Decorative | aria-hidden="true" | Icon is purely visual, no meaning |
Always set accessible-name on icons in Image or Interactive mode.
Invisible Messaging
Use InvisibleMessage to announce dynamic content changes to screen readers (e.g., search results count, form validation, live updates).
- Use Polite for non-urgent updates (search results, status changes)
- Use Assertive for urgent notifications (errors, warnings)
Tooltip
Use the tooltip property instead of the native title attribute.
Do not set title directly on custom elements — this can cause repetitive speech output or incorrect accessibility tree mapping.
High Contrast and Theming
UI5 Web Components ship with high contrast themes:
| Theme | Use case | |
|---|---|---|
sap_horizon | Default light theme | |
sap_horizon_dark | Dark theme | |
sap_horizon_hcb | High Contrast Black | |
sap_horizon_hcw | High Contrast White |
Detect OS preferences and apply the appropriate theme:
Quick Reference
| Goal | Property / API | |
|---|---|---|
| Label a component without visible text | accessible-name="..." | |
| Link a visible label to a component | accessible-name-ref="labelId" or <ui5-label for="inputId"> | |
| Add a description | accessible-description="..." or accessible-description-ref="id" | |
| Change ARIA role | accessible-role="..." | |
| Set expanded/haspopup/controls | accessibilityAttributes = { expanded, hasPopup, controls } | |
| Set heading level | level="H2" on Title, header-level="H2" on Panel | |
| Make icon accessible | mode="Image" + accessible-name="..." | |
| Hide decorative icon | mode="Decorative" | |
| Announce dynamic changes | announce(message, InvisibleMessageMode.Polite) | |
| Set tooltip | tooltip="..." (not title) | |
| Respond to OS contrast settings | Use prefers-contrast media query + setTheme() |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/accessibility/SKILL.md
Popularity
- 7-day trend score
- 0
Refreshed 17 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ui5/webcomponents/accessibility)