Skip to content

fix: visible focus ring for inverted links in One Theme (WCAG 2.4.11) - #4903

Open
Harsh-Anand-Singh wants to merge 1 commit into
mainfrom
dev-v3-hanandji-linkfocusfix
Open

fix: visible focus ring for inverted links in One Theme (WCAG 2.4.11)#4903
Harsh-Anand-Singh wants to merge 1 commit into
mainfrom
dev-v3-hanandji-linkfocusfix

Conversation

@Harsh-Anand-Singh

Copy link
Copy Markdown
Member

Description

In One Theme, color="inverted" links used outside a visual context fall back to the colorBorderItemFocused ring, which resolves to the same Indigo600 primitive as the dark notification-style surfaces inverted links are designed for, making the keyboard focus ring invisible (1.00:1 on the link permutations page). Scope the inverted variant's ring fallback to currentColor under One Theme: the ring always matches the (already legible) inverted text color, guaranteeing >= 3:1 wherever the text itself passes, including light-mode flashbar/alert where a static light ring would fail.

Related links, issue #, if available: n/a

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.66%. Comparing base (670d1fc) to head (b5b7163).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4903   +/-   ##
=======================================
  Coverage   97.66%   97.66%           
=======================================
  Files         958      958           
  Lines       31317    31317           
  Branches    11566    11565    -1     
=======================================
  Hits        30585    30585           
- Misses        686      725   +39     
+ Partials       46        7   -39     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

In One Theme, color="inverted" links used outside a visual context fall
back to the colorBorderItemFocused ring, which resolves to the same
Indigo600 primitive as the dark notification-style surfaces inverted
links are designed for, making the keyboard focus ring invisible
(1.00:1 on the link permutations page). Scope the inverted variant's
ring fallback to currentColor under One Theme: the ring always matches
the (already legible) inverted text color, guaranteeing >= 3:1 wherever
the text itself passes, including light-mode flashbar/alert where a
static light ring would fail. Context-driven rings inside Flashbar and
Alert are unaffected, and explicit Style API focusRing.borderColor
overrides still take precedence.
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.

1 participant