-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Update default theme skin to meet WCAG 2.0 AA contrast ratio thresholds #67
Description
Description
The default theme has a number of elements that fail the Web Content Accessibility Guidelines (WCAG) 2.0 AA contrast ratio thresholds (https://dequeuniversity.com/rules/axe/2.2/color-contrast).
The Lighthouse Accessibility audit identifies the failing elements:
- hyperlinks/buttons
- quote/blockquote
- footer text
The failing elements can be addressed with the following CSS changes:
Hyperlinks/buttons
- Increase contrast of
$accent-colorwith change from#00848ato#00838a
Quote/blockquote/footer
- Increase contrast of
$text-colorwith change from#222831to#181c22, or - Change
colorvalue fromtint($text-color, 40%)totint($text-color, 35%)to reduce tint forblockquote, q(_base.scss) and.site-footer(_footer.scss)
The first approach can be implemented with a new theme skin.
Alternatively, the default theme can be updated directly with the $accent-color change, and either the $text-color change or reduced tint.
I'm happy to create a pull request if any of these approaches are acceptable.
Environment
- Basically Basic version: 1.4.0
- Ruby gem or remote theme version: Both
- Jekyll version: 3.7.3
- Git repository URL:
- Operating system: All
- GitHub Pages hosted (if yes provide URL to site):
Expected behavior
Increase the default theme skin score to 100 on the Lighthouse Accessibility audit.
Steps to reproduce the behavior
- In Google Chrome, go to https://mmistakes.github.io/jekyll-theme-basically-basic/markup/markup-html-elements-and-formatting/
- Open Chrome DevTools.
- Click the Audits tab.
- Click Perform an audit. DevTools shows you a list of audit categories. Untick all except Accessibility.
- Click Run audit. Once completed, the Lighthouse report lists the elements that do not have a sufficient contrast ratio.