Skip to content

a11y: adopt pa11y wcag2aaa preset#55

Merged
SethFalco merged 1 commit into
svg:mainfrom
SethFalco:pa11y-aaa
Feb 27, 2026
Merged

a11y: adopt pa11y wcag2aaa preset#55
SethFalco merged 1 commit into
svg:mainfrom
SethFalco:pa11y-aaa

Conversation

@SethFalco
Copy link
Copy Markdown
Member

Switches the standard of Pa11y we follow from WCAG2AA to WCAG2AAA. In general, I only aim for AA criteria, but for the rules that can be checked automatically, I'd like to strive for AAA as well.

Most of the issues reported by Pa11y were color contrast issues on light mode.

  1. Mostly because I don't use the site in light mode, so I clearly wasn't paying enough attention.
  2. The default Docusaurus theme only strived for WCAG A or AA, not AAA. So we have to override more of the defaults to push it over to the next level.

Changes

Before After
Links image image
Sidebar (Light mode) image image
Preset Badge image image
Footer image image

In the screenshots above, the differences probably look pretty subtle. However, when actually using the site it's more apparent.

Chores

Color Model

While doing this, I also migrated most colors from hex to HSL. During development, I always use HSL anyway, I just persisted them as hex out of habit. However, HSL is much more intuitive to work with, and the colors are replaced with hex during the build anyway.

!important

When overriding a CSS variable from a theme/plugin, I'm just defaulting to use !important now.

Historically, I only ever used !important when it seemed necessary, but now I find it be simpler when working with third-party variables.

Related

@SethFalco SethFalco merged commit ccfe529 into svg:main Feb 27, 2026
4 checks passed
@SethFalco SethFalco deleted the pa11y-aaa branch February 27, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant