Skip to content

Stop screen-reader-only code blocks from being scrollable regions - #2234

Draft
cwickham wants to merge 1 commit into
mainfrom
fix/visually-hidden-code-scroll
Draft

cwickham wants to merge 1 commit into
mainfrom
fix/visually-hidden-code-scroll

Conversation

@cwickham

@cwickham cwickham commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

The get-started Jupyter pages have screen-reader-only code blocks ({.markdown .visually-hidden}, {.yaml .visually-hidden}). Each block is a 1px box that scrolls, so axe reports scrollable-region-focusable (WCAG 2.1.1) on each one.

  • Cause: Quarto's pre.sourceCode { overflow-y: visible !important } beats Bootstrap's .visually-hidden { overflow: hidden !important }. As a result, the box computes to overflow-y: auto.
  • Fix: One rule in styles.css gives overflow: hidden !important back to pre.sourceCode.visually-hidden.
  • Why here: quarto-cli#14816 will skip these blocks on purpose, and Quarto does not change Bootstrap utility classes that authors can use.

I did an axe scan before and after on the three pages. All 20 instances are gone, and nothing is new or worse. The hidden blocks stay 1×1 and clipped in light and dark mode, at 1440×900 and 320×568.

Check

@github-actions

Copy link
Copy Markdown
Contributor

📝 Preview Deployment

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

This branch has not been deployed

No deployments
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