Skip to content

Accessibility fixes: nav link label, code-block contrast, footer link name#2095

Merged
cwickham merged 3 commits into
mainfrom
accessibility-fixes
Jul 10, 2026
Merged

Accessibility fixes: nav link label, code-block contrast, footer link name#2095
cwickham merged 3 commits into
mainfrom
accessibility-fixes

Conversation

@cwickham

@cwickham cwickham commented Jul 10, 2026

Copy link
Copy Markdown
Member

Three independent accessibility fixes surfaced by an axe-core audit of the rendered site.

1. Add aria-label to the external-link icon on the nav "Blog" link (498cad3)

The Blog navbar entry links out to the Posit blog with an external-link icon; the icon had no accessible text. Adds an aria-label so assistive tech announces it.

2. Light-mode code-block background for contrast (af1b20c)

The site uses a11y syntax highlighting, whose token colors are tuned for the theme's own near-white background. Quarto's default code-block background is a semi-transparent gray that, over shaded sections, composited down to #eceef1 and dropped the orange attribute token (#a55a00) to 4.44:1 — below WCAG AA (4.5:1).

Fix pins $code-block-bg to #eff2f5 — the darkest tint of the site's cosmo blue-gray that keeps every a11y-light token ≥ 4.5:1 (the binding constraint is the red keyword #d91e18). Because WCAG contrast depends on luminance only, this stays pale regardless of hue. Dark mode was checked and already passes comfortably (7–13:1), so it's untouched.

3. Fix empty footer link (53b2924) — link-name, serious

The footer had two separate links to posit.co, one per theme (light/dark logo). Because the off-theme logo is display:none, its alt didn't count toward the link's accessible name, leaving an empty focusable link in the tab order (fires in dark mode; would fire in light for the other link). Merged into a single link wrapping both logos, so exactly one visible, alt-bearing image names the link in either theme. Verified the accessible name resolves to "Posit" in dark mode.

Screenshots — light-mode code block (fix #2)

Before After
markdown-basics-codeblock-before markdown-basics-codeblock-after

@github-actions github-actions Bot temporarily deployed to pull request July 10, 2026 19:00 Inactive
@github-actions

Copy link
Copy Markdown
Contributor

📝 Preview Deployment

🔍 Full site preview: https://deploy-preview-2095.quarto.org

@cwickham cwickham marked this pull request as ready for review July 10, 2026 21:19
@cwickham cwickham merged commit 8f6c318 into main Jul 10, 2026
4 checks passed
@cwickham cwickham deleted the accessibility-fixes branch July 10, 2026 21:19
@github-actions

Copy link
Copy Markdown
Contributor

cwickham added a commit that referenced this pull request Jul 10, 2026
… name (#2095) (#2096)

* Add aria-label to icon in nav Blog link

* Tweak code background in light theme for contrast

* Fix empty link in footer

(cherry picked from commit 8f6c318)

Co-authored-by: Charlotte Wickham <charlotte.wickham@posit.co>
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