Skeleton

Accessibility

Accessibility props

NameTypeDescription
titlestringProvides an accessible description of the skeleton for screen readers.

Automatic Accessibility Features

Best practices

    • Apply aria-busy="true" to the content container while data is loading
    • Change to aria-busy="false" when loading completes
    • Consider adding role="status" to the container to inform screen readers of state changes

Keyboard Navigation

  • When content finishes loading and interactive elements appear, they should be properly focusable according to a logical tab order.
  • If loading content will add focusable elements to the page, consider managing focus to guide users to the newly loaded content.
  • For very long loading times, consider providing a way for keyboard users to skip over large skeleton sections to reach other interactive content on the page.

Examples

Basic Skeleton with accessible title

<Skeleton title="Loading product details" height={200} width={300} />

Proper use of aria-busy with Skeleton

<div role="status" aria-busy={isLoading}>
{isLoading ? (
// While loading, show skeleton
<Skeleton title="Loading flights list" rows={3} />
) : (
// When loaded, show content (aria-busy is already false via the container)
<FlightsList />
)}
</div>