Visitar URL original
USWDS - Range slider: Improve border visibility by manichandra · Pull Request #6659 · uswds/uswds · GitHub
Skip to content

USWDS - Range slider: Improve border visibility - #6659

Merged
ethangardner merged 6 commits into
uswds:developfrom
manichandra:codex/uswds-6444-range-contrast
Jun 4, 2026
Merged

ethangardner merged 6 commits into
uswds:developfrom
manichandra:codex/uswds-6444-range-contrast

Conversation

@manichandra

Copy link
Copy Markdown
Contributor

Summary

Improved range slider visibility for low-vision users. The range slider border now uses a thicker 2px width and darker #646464 color for stronger contrast against the slider background.

Breaking change

This is not a breaking change.

Related issue

Closes #6444

Related pull requests

None.

Preview link

Preview link: N/A

Problem statement

The range slider border was difficult to see because the default border was thin and had limited contrast against the slider background. This could make the component harder for low-vision users to perceive.

Solution

Updated the range slider border styling to use a 2px border and #646464, matching the issue recommendation. This applies to the track border and thumb border treatment while leaving the existing focus behavior unchanged.

Major changes

  • Increased the range slider track border from 1px to 2px.
  • Updated the range slider border color to #646464.
  • Updated the thumb border treatment to use the same 2px #646464 styling.

Testing and review

Tested locally with:

npx prettier --check packages/usa-range/src/styles/_usa-range.scss
npx stylelint packages/usa-range/src/styles/_usa-range.scss
npx gulp compileSass
npm run lint:sass
git diff --check

@manichandra

Copy link
Copy Markdown
Contributor Author
image

after the fix

@chandracarney

Copy link
Copy Markdown
Contributor

Thank you @manichandra! Accessibility improvement-wise, this is looking good to me. I've added one of our engineers to give a review and sign-off.

@chandracarney chandracarney added Affects: Accessibility 🟡 Affects access for disabled users or assistive tech. Record the barrier; not a severity score. Package: Range Slider Work affecting Range Slider. Apply only when this area helps route or find the issue. Affects: Usability Relates to the usability of our code or components Affects: Display Relates to how code renders on-screen labels May 29, 2026

@ethangardner ethangardner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I left some comments related to conventions we follow elsewhere in the codebase and there are two stylistic changes I requested.

Comment thread packages/usa-range/src/styles/_usa-range.scss Outdated
Comment thread packages/usa-range/src/styles/_usa-range.scss Outdated
@github-project-automation github-project-automation Bot moved this from Triage to In progress in USWDS Core Project Data Jun 1, 2026

@ethangardner ethangardner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@ethangardner
ethangardner merged commit 6e0ef7a into uswds:develop Jun 4, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Fed Final Review in USWDS Core Project Data Jun 4, 2026
@chandracarney chandracarney moved this from Fed Final Review to Done in USWDS Core Project Data Jul 20, 2026
@annepetersen annepetersen added this to the uswds 3.14.0 - Aug 2026 milestone Aug 4, 2026
@annepetersen annepetersen added the ❤️ Thanks Historical appreciation marker. Prefer a reaction; not required for triage. label Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Affects: Accessibility 🟡 Affects access for disabled users or assistive tech. Record the barrier; not a severity score. Affects: Display Relates to how code renders on-screen Affects: Usability Relates to the usability of our code or components Package: Range Slider Work affecting Range Slider. Apply only when this area helps route or find the issue. ❤️ Thanks Historical appreciation marker. Prefer a reaction; not required for triage.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

USWDS - Feature: Improve color contrast and focus outline on range slider

4 participants