Repository navigation
Conversation
The .btn-assistant:hover rule swapped its background to --agent-purple, which in dark mode resolves to a light lavender (#c3b5e4). Against the button's white text that produced ~1.9:1 contrast, well under the WCAG AA 4.5:1 minimum for text. Hover now brightens the existing fill instead of switching color tokens, keeping contrast at ~7.3:1 in both themes. Updated the matching unit test to assert the new hover behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pelikhan
marked this pull request as ready for review
October 5, 2026 21:50
pelikhan
deleted the
primer-branding/fix-assistant-button-contrast-561f1ea7122fb16c
branch
October 5, 2026 21:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Accessibility
.btn-assistant:hover:not(:disabled)(the "Analyze" button in the intent step) swapped its background tovar(--agent-purple). In dark mode this token resolves to a light lavender (#c3b5e4), and against the button's white text that produced roughly 1.9:1 contrast — well under the WCAG AA minimum of 4.5:1 for text.--agent-purple-darkfill (filter: brightness(1.12)) instead of switching color tokens. Contrast is now ~7.3:1 in both light and dark themes..btn-assistanttext color from a hardcoded#fffffftovar(--control-fg-on-emphasis, #ffffff)for consistency with the rest of the button system (same visual result, token-based).Guidance that motivated this change
Retrieved from the
primer-brandMCP server:primer_brand_tokensreturned the base purple scale (--base-color-scale-purple-0through-9) confirming--agent-purple(#c3b5e4in dark mode) sits near the light end of the scale — intended for text/accent use, not as a button fill paired with white text.What I audited but did not change
--accent-blue,--label-*,--agent-purple-dark) pass WCAG AA contrast in both themes (checked against Primer base-color-scale values).--brand-fontStack-sansSerifstack.radial-gradient(..., #000, transparent ...)in.is-landing .landing::beforeis amask-imagealpha gradient (not a visible color), so it's not a branding deviation.Validation
npm test— 327/327 tests passing (updated one test assertion to match the new hover behavior).npm run build(vianpx vite build, since the vendor-asset prefetch step requires npm registry access unavailable in this sandbox) — build completes successfully, producingdist/output with no errors.Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
registry.npmjs.orgTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.