fix(a11y): prevent carousel caption text truncation at high zoom#397
Merged
Conversation
The home page carousel caption is position:absolute, so it does not
contribute to the carousel height; the carousel height comes from the
image. At high zoom the "Recent Posts" slide (heading + four stacked
post columns) grows taller than the image and is clipped by
.carousel-inner{overflow:hidden}, truncating the text.
Below Bootstrap's md breakpoint (<=991px, which includes 400% zoom of a
1280px viewport per WCAG 1.4.10 Reflow) the post columns stack, so make
the caption flow in normal document flow (position:static, no negative
margins, no max-height). The carousel container then grows to fit the
caption and nothing is clipped. The >=992px desktop overlay is
unchanged.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
xuzhg
approved these changes
Jun 15, 2026
There was a problem hiding this comment.
Pull request overview
This PR fixes an accessibility issue on the homepage “Recent Posts” carousel where caption text is clipped/truncated at high zoom due to the caption being an absolutely positioned overlay inside an overflow: hidden carousel container.
Changes:
- Adds a
<992pxmedia query to make.carousel-captionparticipate in normal document flow (position: static) so the slide can grow vertically. - Removes constraining/offsetting styles for the caption at that breakpoint (margins and max dimensions), preserving the desktop overlay behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
At 400% zoom the "Recent Posts" carousel slide grows taller than its background image and is clipped by
.carousel-inner { overflow: hidden }, truncating the caption text (WCAG 1.4.10 Reflow).Where the issue is
The homepage carousel "Recent Posts" slide at 400% page zoom.
Solution
Below Bootstrap's md breakpoint (<=991px), let the caption flow in normal document flow (
position: static, no negative margins, no max-height) so the carousel container grows to fit it. The >=992px desktop overlay is unchanged.Where in code
public/css/site.css- new@media (max-width: 991px)block overriding.carousel-caption.Validated against WCAG 2.1 AA (keyboard, screen reader, and 400% zoom where applicable).
Before at 400% zoom
After at 400% zoom