Skip to content

Implement forced colors for progress bar - #6881

Merged
langermank merged 3 commits into
mainfrom
progress-force-hc
Sep 22, 2025
Merged

Implement forced colors for progress bar #6881
langermank merged 3 commits into
mainfrom
progress-force-hc

Conversation

@langermank

Copy link
Copy Markdown
Contributor

CopilotAI review requested due to automatic review settings September 19, 2025 00:22
@langermank
langermank requested a review from a team as a code ownerSeptember 19, 2025 00:22
@changeset-bot

changeset-botBot commented Sep 19, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b4f0f7e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@primer/reactPatch
@primer/styled-reactPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

CopilotAI 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.

Pull Request Overview

This PR implements forced colors mode support for the ProgressBar component to improve accessibility for users with high contrast display preferences. The changes ensure the progress bar remains visible and functional when Windows High Contrast mode or similar accessibility features are enabled.

  • Adds CSS media query for forced-colors mode with appropriate color mappings
  • Configures forced-color-adjust property to maintain custom styling in high contrast environments

Comment on lines +64 to +67
:root {
--progress-bg: LinkText;
--progressBar-track-bgColor: CanvasText;
}

CopilotAISep 19, 2025

Copy link

Choose a reason for hiding this comment

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

The CSS custom property names are inconsistent. --progress-bg uses kebab-case while --progressBar-track-bgColor uses camelCase. Consider standardizing to kebab-case for consistency: --progress-bar-track-bg-color.

Copilot uses AI. Check for mistakes.
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@github-actionsgithub-actionsBot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 19, 2025
@github-actions
github-actionsBot requested a deployment to storybook-preview-6881 September 19, 2025 00:25 Abandoned
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6881 September 19, 2025 00:33 Inactive
@media (forced-colors: active) {
:root {
--progress-bg: LinkText;
--progressBar-track-bgColor: CanvasText;

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.

I trust your judgment here but it looks like this might be problematic in the future if we start changing values

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Like change the CSS vars? That's a good point. I suppose if we changed the naming we would see these in the same file and update them.. I'll merge for now but we could always just move it to define the CSS instead!

@langermank
langermank added this pull request to the merge queueSep 22, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6881 September 22, 2025 17:28 Inactive
Merged via the queue into main with commit 8d52362Sep 22, 2025
40 of 41 checks passed
@langermank
langermank deleted the progress-force-hc branch September 22, 2025 17:36
@primerprimerBot mentioned this pull request Sep 22, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommendedThis change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@langermank@hectahertz@jonrohan