From ca25e158c7cf28c70a2cb3a0ac0abecb5765a348 Mon Sep 17 00:00:00 2001 From: Francis Storr Date: Fri, 14 Jul 2023 13:09:03 -0700 Subject: [PATCH] Accessibility color contrast fixes (#864) * Fix incorrectly formatted link in docs Signed-off-by: Francis Storr * Font styling, color contrast, other accessibility updates This update: 1. Restores Roboto and Lato fonts for most body copy, leaving Intel One Mono for code samples. 2. Adds colors (in `colors.css`) 3. Adds a new `accessibility_overrides.css` file containing CSS that improves the accessibility of the documentation and, where possible, Read The Docs. These updates remediate numerous non-conforming WCAG 2.x Level AA bugs. The use of a separate file for this hopefully makes these changes easier to manage and less likely to be accessibility overwritten in the future. Closes #848 Signed-off-by: Francis Storr * Color contrast updates for accessibility Color contrast updates for accessibility - update generic `a` element - update color of links in the toggle-able read-the-docs panel - update the color of the text in search results - update the color of notes headers Signed-off-by: Francis Storr --------- Signed-off-by: Francis Storr Signed-off-by: Parth Mandaliya --- docs/_static/css/accessibility_overrides.css | 32 +++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/docs/_static/css/accessibility_overrides.css b/docs/_static/css/accessibility_overrides.css index 192c18f0a1c..6fc24c510a0 100644 --- a/docs/_static/css/accessibility_overrides.css +++ b/docs/_static/css/accessibility_overrides.css @@ -4,9 +4,12 @@ font-size: 100%; } - /* links */ + a{ + color:var(--classic-blue); + } + [role=main] a, footer a:not([class*=btn-neutral]){ color: var(--classic-blue); @@ -18,6 +21,18 @@ color: var(--cobalt); } + .rst-versions.shift-up a{ + color:var(--classic-blue-tint2); + } + + /* read the docs meta information in toggle content */ + + .rst-versions .rst-other-versions{ + color:var(--carbon-tint1); + } + + /* end read the docs meta information in toggle content */ + /* end links */ footer{ @@ -43,8 +58,16 @@ margin-bottom:1.5rem; } - /* flow content */ + /* search results */ + + #search-results .context{ + color:var(--black); + } + + /* end search results */ + + /* flow content */ p { line-height: inherit; @@ -126,7 +149,7 @@ /* end sidebar */ - /* =notes and similar */ + /* notes and similar */ .rst-content .note .admonition-title, .rst-content .note .wy-alert-title, @@ -155,7 +178,7 @@ .rst-content .wy-alert.wy-alert-info .admonition-title, .wy-alert.wy-alert-info .rst-content .admonition-title, .wy-alert.wy-alert-info .wy-alert-title{ - background: var(--blue-steel); + background: var(--blue-steel-shade1); } /* code and code blocks */ @@ -176,5 +199,4 @@ font-size:0.875rem; } - } \ No newline at end of file