--- name: accessibility description: 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. user-invocable: false --- # 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-combobox` renders `role="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`, `checked` are 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. ```html ``` Use `accessibleName` when there is no visible text label, for example icon-only buttons or inputs without a ``. ### 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. ```html Full name Shipping Address ``` 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. ```html

Must be at least 8 characters

``` ### accessibleRole Overrides the default ARIA role of a component. ```html ... ... Navigate ``` 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. ```html Open Menu ... ``` 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 `