Skip to content

fix(slider): Add aria-label to slider thumbs for accessibility#10224

Open
cyphercodes wants to merge 2 commits intoshadcn-ui:mainfrom
cyphercodes:fix/slider-aria-label
Open

fix(slider): Add aria-label to slider thumbs for accessibility#10224
cyphercodes wants to merge 2 commits intoshadcn-ui:mainfrom
cyphercodes:fix/slider-aria-label

Conversation

@cyphercodes
Copy link
Copy Markdown

Summary

Added aria-label attributes to slider thumb components to improve accessibility for screen reader users.

Issue

Slider thumbs lacked aria-label attributes, making multi-thumb range sliders inaccessible to screen reader users who couldn't identify which thumb was focused.

Changes

Updated slider components in:

  • apps/v4/registry/new-york-v4/ui/slider.tsx
  • apps/v4/registry/bases/base/ui/slider.tsx
  • apps/v4/registry/bases/radix/ui/slider.tsx

Each thumb now has an aria-label indicating its position (e.g., 'Slider thumb 1 of 2').

Impact

This change improves the accessibility of slider components by providing context to screen reader users about which thumb is focused, especially important for multi-thumb range sliders.

Fixes #10221

When fetching from registry URLs, the CLI now sends an Accept: application/json
header. This allows custom registries to use content negotiation to serve JSON
to the CLI while serving HTML documentation to browsers at the same URL.

Fixes shadcn-ui#10164
Added aria-label attributes to slider thumb components to improve
accessibility for screen reader users. Each thumb now has a descriptive
label indicating its position (e.g., 'Slider thumb 1 of 2').

This makes multi-thumb range sliders accessible by providing context
about which thumb is focused.

Fixes shadcn-ui#10221
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 29, 2026

@cyphercodes is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[a11y]: Slider thumbs lack aria-label, making multi-thumb range sliders inaccessible

1 participant