Skeleton
What component has
Roles and attributes
| Attribute | Usage |
|---|---|
aria-label="Loading…" | Sets an accessible name for the element. |
Considerations for developers and designers
- When displaying
Skeletonin place of a heading, avoid semantic heading markup, as this can make navigation confusing for screen reader users. - Place
Skeletoninside a container withrole="status"andaria-live="polite"attributes for the screen reader to announce the start of the loading process (example). - If there's more than one
Skeletonin aTable, aCard, or another container, and they can start or finish loading simultaneously, add thearia-busy="true"attribute to the container and set it tofalsewhen all items have finished loading. This ensures the user isn't repeatedly notified about the loading of each element.
Resources
- Detailed information about
aria-busystate you can find in the W3's guide. - MDN's guide for aria-busy describes core information for this state.
Other recommendations
Find more accessibility recommendations in the common Accessibility guide.