Skip to content

Commit 4ff8bdf

Browse files
committed
fix(a11y): make content accessible at 200% browser zoom
At 200% zoom a 1280 px display has a CSS viewport of ~640 px, which triggers the RTD mobile breakpoint at 768 px. However the custom clamp(800px, ...) keeps a hard 800 px minimum on the content area, causing horizontal overflow and making the page content unreachable without horizontal scrolling. WCAG 1.4.4 (Resize Text) / BITV 9.1.4.4 requires that content be fully usable up to 200% magnification. Add a media-query override to remove the width floor at narrow viewports so the content uses the available space. Fixes #9678 Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent c5c2990 commit 4ff8bdf

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

_shared_assets/static/custom.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,22 @@ div#list-of-available-icons > blockquote > div > div > p {
130130
max-width: 900px;
131131
}
132132

133+
/* At 200% browser zoom a 1 280 px display has an effective viewport of
134+
~640 px, which is below the RTD mobile breakpoint (768 px). The
135+
clamp() above keeps a hard 800 px minimum that then overflows the
136+
viewport horizontally, making the documentation content unreachable
137+
without horizontal scrolling (WCAG 1.4.4 / BITV 9.1.4.4).
138+
Override to 100% so the content fills the available space. */
139+
@media screen and (max-width: 768px) {
140+
.wy-nav-content {
141+
max-width: 100% !important;
142+
}
143+
144+
.wy-nav-content section {
145+
max-width: 100%;
146+
}
147+
}
148+
133149
table.docutils {
134150
min-width: 50%;
135151
}

0 commit comments

Comments
 (0)