Skip to content

Commit

Permalink
Accessibility color contrast fixes (securefederatedai#864)
Browse files Browse the repository at this point in the history
* Fix incorrectly formatted link in docs

Signed-off-by: Francis Storr <francis.storr@intel.com>

* 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 securefederatedai#848

Signed-off-by: Francis Storr <francis.storr@intel.com>

* 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 <francis.storr@intel.com>

---------

Signed-off-by: Francis Storr <francis.storr@intel.com>
Signed-off-by: Parth Mandaliya <parthx.mandaliya@intel.com>
  • Loading branch information
fstrr authored and ParthM-GitHub committed Sep 28, 2023
1 parent 7308c1e commit 7666bfe
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions docs/_static/css/accessibility_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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{
Expand All @@ -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;
Expand Down Expand Up @@ -126,7 +149,7 @@
/* end sidebar */


/* =notes and similar */
/* notes and similar */

.rst-content .note .admonition-title,
.rst-content .note .wy-alert-title,
Expand Down Expand Up @@ -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 */
Expand All @@ -176,5 +199,4 @@
font-size:0.875rem;
}


}

0 comments on commit 7666bfe

Please sign in to comment.