Skip to content

[Sync to prerelease] Accessibility fixes for the gallery page#2098

Merged
cderv merged 1 commit into
prereleasefrom
sync-2097-to-prerelease
Jul 13, 2026
Merged

[Sync to prerelease] Accessibility fixes for the gallery page#2098
cderv merged 1 commit into
prereleasefrom
sync-2097-to-prerelease

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Description

Sync of #2097 to prerelease.

Original PR

Accessibility fixes for the gallery page

Fixes accessibility (axe-core) violations on the gallery page.

Changes

  • Card links had no accessible name (link-name, WCAG 2.4.4 / 4.1.2). The gallery cards are image-only links that used an empty description as alt. Added per-entry alt: to gallery.yml and updated gallery.ejs to fall back to alt (or title/subtitle) instead of description.
  • Carousel images had no alt (image-alt, WCAG 1.1.1) and their wrapping links had no accessible name (link-name). Added alt: per item in carousel.yml (reusing the gallery's descriptions where the image is shared) and threaded it through carousel.R.
  • No level-one heading (page-has-heading-one). The "Gallery" title was a styled div; gave it role="heading" aria-level="1". A markdown heading / <h1> gets promoted into the page's hidden title-block header, so an ARIA heading keeps it both visible and semantic.

Includes the rebuilt _freeze for the gallery page (the carousel is executed R).

Verification

Checked with axe-core across desktop/mobile × light/dark — image-alt, link-name, and page-has-heading-one all clear on the page. The remaining aria-allowed-role on the navbar toggler is site-wide navbar chrome, not gallery-specific.

Draft while the approach is reviewed.

* fix(gallery): give card images alt text for accessible link names

Gallery cards are image-only links; they used the (empty) tile.description
as alt, so each link had no accessible name (axe link-name, WCAG 2.4.4 /
4.1.2 — ~89 across the page). Add per-entry alt: to gallery.yml and fall
back in gallery.ejs to the alt (or title + subtitle) instead of description.

* fix(gallery): alt text for carousel images and a real page heading

Remaining axe findings on the gallery page beyond the card links:
- carousel images had no alt (image-alt, WCAG 1.1.1) and their wrapping
  links had no accessible name (link-name, 2.4.4/4.1.2). Add alt: per item
  in carousel.yml (reusing the gallery's descriptions where the image is
  shared) and pass it through carousel.R.
- the 'Gallery' title was a styled div, so the page had no level-one
  heading (page-has-heading-one). Give it role=heading aria-level=1 — a
  markdown/HTML h1 gets promoted into the hidden title-block header here.

Rebuilds the gallery freeze (carousel is executed R); no axe in the freeze.
Verified with the axe checker: image-alt, link-name, page-has-heading-one
all clear on the gallery page.

(cherry picked from commit fddcebf)
@cderv

cderv commented Jul 10, 2026

Copy link
Copy Markdown
Member

/deploy-preview

@github-actions

Copy link
Copy Markdown
Contributor Author

📝 Preview Deployment

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

🔄 Modified Documents

@cderv cderv merged commit a1ce567 into prerelease Jul 13, 2026
@cderv cderv deleted the sync-2097-to-prerelease branch July 13, 2026 13:53
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.

2 participants