Skip to content

Use real buttons for lightbox triggers#28

Merged
joeseverino merged 1 commit into
mainfrom
fix/lightbox-trigger-buttons
Jun 18, 2026
Merged

Use real buttons for lightbox triggers#28
joeseverino merged 1 commit into
mainfrom
fix/lightbox-trigger-buttons

Conversation

@joeseverino

Copy link
Copy Markdown
Owner

Summary

  • wrap enhanced article images in real button triggers instead of assigning button semantics to img elements
  • keep no-JS images plain while preserving pointer and keyboard lightbox behavior
  • trim redundant lightbox CSS declarations and update Playwright selectors

Why

Lighthouse flagged the merged lightbox implementation for invalid ARIA because role=button is not allowed on img. This follow-up keeps the feature lightweight while using native controls for the interactive trigger.

Validation

  • npx playwright test tests/playwright/lightbox.spec.ts tests/playwright/a11y.single.spec.ts --project=chromium-desktop
  • npx playwright test tests/playwright/menu.mobile.spec.ts --project=chromium-mobile
  • npm run diagnose -- --fast
  • npm run diagnose

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying jseverino with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8570071
Status: ✅  Deploy successful!
Preview URL: https://52a02378.jseverino.pages.dev
Branch Preview URL: https://fix-lightbox-trigger-buttons.jseverino.pages.dev

View logs

@joeseverino joeseverino marked this pull request as ready for review June 18, 2026 21:19
@joeseverino joeseverino merged commit 734532d into main Jun 18, 2026
8 of 9 checks passed
@joeseverino joeseverino deleted the fix/lightbox-trigger-buttons branch June 18, 2026 21:29
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