Skip to content

Commit 2a86221

Browse files
committed
fix(a11y): fix contrast ratio of content links
RTD theme uses #2980b9 for links, which gives ~4.3:1 against white. WCAG AA / BITV 9.1.4.3 requires 4.5:1 for normal-weight text. Override to #2474a4 (~5.1:1) in the content area only, so it does not affect sidebar or header links that sit on coloured backgrounds. Fixes #9674 Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent c5c2990 commit 2a86221

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

_shared_assets/static/custom.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ h6 {
1717
background-color: #0082c9;
1818
}
1919

20+
/* Content links — RTD default #2980b9 gives ~4.3:1 against white,
21+
below the 4.5:1 required by WCAG AA / BITV 9.1.4.1 and 9.1.4.3.
22+
#2474a4 yields ~5.1:1 while keeping the same blue visual style. */
23+
.rst-content a,
24+
.rst-content a:visited {
25+
color: #2474a4;
26+
}
27+
2028
/* Reduce size of logo in top left */
2129
.wy-side-nav-search > a img.logo {
2230
max-width: 180px;

0 commit comments

Comments
 (0)