Fix WCAG AA contrast failures and brand deviations in the theme
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
A brand and accessibility check of the theme (v8.2.1) found two WCAG AA contrast failures and several items that do not follow the Posit brand guidelines. The check used the theme source and the rendered example site in light and dark mode.
Accessibility failures (WCAG AA)
- "Preview feature" badge, light mode. The badge text is Posit orange (
#ee6331) on white at 12px. The contrast is 3.25:1. Small text must be 4.5:1 or more. The comment intheme.scss:16says "contrast: 8.45". This value is incorrect.- Files:
_extensions/posit-docs/theme.scss:16,:294,:306 - The badge also has a pill shape (
border-radius: 50rem) and uses orange as label text. The brand does not permit either one. - Possible fix: use Posit blue text (
#447099, 5.2:1 on white) or#111C26text on an orange fill. Use a 4px border radius.
- Files:
- Lettered step circles (
ol.groovyAlpha). The circles show white text on#fc403bat 14px. The contrast is 3.54:1.#fc403bis not a Posit color.- File:
_extensions/posit-docs/theme.scss:326-340 - No page in the example site uses this class, so this result comes from the CSS only.
- File:
Brand items
- Navbar icon in dark mode. The navbar shows the full-color icon (
posit-icon-fullcolor.svg) on the dark navbar. The brand requires the white or reverse logo on dark backgrounds. The footer already changes to the reverse logo in dark mode.- File:
_extensions/posit-docs/_extension.yml:14 - Possible fix: set a
darkvalue for the navbarlogo. This needs an approved white or reverse icon file.
- File:
- Page action bar border radius. The bar has a 6px radius. The brand standard is 4px. The bar also uses Bootstrap grays, greens, and reds and not Posit colors. All the text passes AA.
- File:
_extensions/posit-docs/assets/_page-actions.html:11
- File:
- 600 (semibold) font weight. The brand does not use the 600 weight. The theme loads 500 and 600 from Google Fonts. The 600 weight shows on callout titles (Quarto default style) and on the Grid example tabs (
example/grid.qmd). - Color values. Most of the light and dark shades in
_posit-colors.scssare slightly different from the official palette. Examples:#d1dbe5(official#D0DBE5),#305775(official#335472),#17212b(official#111C26).$posit-whiteis#f2f2f2, and the official off-white is#F3F6F8. The dark-mode primary color#468CCDand the page background#181c25are not in the palette.- This item changes the appearance of all docs sites. Do it in a separate minor release with a visual review.
Example site
- Placeholder alt text. The image in
example/user.qmd:40has the alt text "testing for alt text stuff". Replace it with a description of the image, for example "Posit logo".
Items that we keep
- Headings use weight 400. The brand uses Light (300) for headlines, but Light is difficult to read at h4-h6 sizes in docs.
- The "Important" callout uses burgundy for the border and icon only, not for text.
- Dominant language
- SCSS
- Stars
- 6
- Forks
- 5
- Avg merge
- 8h 10m
- Merged PRs (30d)
- 8
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/product-doc-theme
-
accessibility bug CSS - Styles
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
posit-dev/product-doc-theme#216 ·
Maintainers usually reply within 1 day
-
accessibility bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
posit-dev/product-doc-theme#214 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
posit-dev/product-doc-theme#194 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
posit-dev/product-doc-theme#193 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
posit-dev/product-doc-theme#213 ·
Maintainers usually reply within 1 day