From b5b71631294027062d0433203ca9493bd2e5830a Mon Sep 17 00:00:00 2001 From: Harsh Date: Thu, 13 Aug 2026 15:05:41 +0200 Subject: [PATCH] fix: visible focus ring for inverted links in One Theme (WCAG 2.4.11) 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. --- src/link/styles.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/link/styles.scss b/src/link/styles.scss index b87bfe5514..eac026942f 100644 --- a/src/link/styles.scss +++ b/src/link/styles.scss @@ -58,6 +58,11 @@ &.color-inverted { color: awsui.$color-text-link-inverted-default; + @include theming.one-theme-only { + #{custom-props.$styleFocusRingBoxShadow}: 0 0 0 + var(#{custom-props.$styleFocusRingBorderWidth}, awsui.$border-link-focus-ring-shadow-spread) + var(#{custom-props.$styleFocusRingBorderColor}, currentColor); + } &:not(.button) { text-decoration-line: underline; text-decoration-color: currentColor;