Skip to content

fix(preview): expose the page selector's open/closed state to screen readers - #6960

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/preview-page-selector-aria-expanded-w3
Sep 3, 2026
Merged

fix(preview): expose the page selector's open/closed state to screen readers#6960
pedrofrxncx merged 1 commit into
mainfrom
fix/preview-page-selector-aria-expanded-w3

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Source: a11y gap found while auditing apps/web/src/components/sandbox/preview/preview.tsx (sandbox preview components focus area) — the recent site-editor toolbar rework (#6943/#6946/#6947) touched this file without adding it.

Payoff: the chevron button that opens/closes the CMS page-selector popover (page name + :param inputs + "Create page") had aria-label but no aria-expanded, so a screen-reader user got no indication the control is a disclosure toggle or which state it's in — the same gap this repo has fixed repeatedly for other toggles (#6884, #6895, #6902, #6903).

Fix: add aria-expanded={pagesOpen} to the toggle button, mirroring the existing pattern in page-template-select.tsx and other disclosure buttons in the codebase.

Verify: open Preview on a deco-framework repo, inspect the page-selector chevron button in devtools — aria-expanded should flip between false/true as the popover opens/closes.

Checks run locally: bun run fmt, cd apps/web && bunx tsc --noEmit (zero errors touching this file — the one pre-existing error is an unrelated prosemirror version-hoisting conflict in mention-suggestion.tsx), bunx oxlint apps/web/src/components/sandbox/preview/preview.tsx (0 warnings/errors). No test added — a one-line ARIA attribute on an existing toggle isn't independently testable logic; full CI covers the rest.


Summary by cubic

Adds aria-expanded to the page-selector chevron button so screen readers announce whether the popover is open or closed. Previously the button only had an aria-label, giving no indication that it toggles a disclosure.

Written for commit 2647dcf. Summary will update on new commits.

Review in cubic

…readers

The chevron button that toggles the CMS page-selector popover had an
aria-label but no aria-expanded, so a screen reader user got no signal that
activating it opens/closes a popover, or which state it's currently in.
@pedrofrxncx
pedrofrxncx enabled auto-merge (squash) September 3, 2026 23:00
@pedrofrxncx
pedrofrxncx merged commit fb55184 into main Sep 3, 2026
34 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/preview-page-selector-aria-expanded-w3 branch September 3, 2026 23:08
decocms Bot pushed a commit that referenced this pull request Sep 3, 2026
PR: #6960 fix(preview): expose the page selector's open/closed state to screen readers
Bump type: patch

- decocms (apps/api/package.json): 4.328.3 -> 4.328.4
- @decocms/native (apps/native/package.json): 4.328.3 -> 4.328.4

Deploy-Scope: web
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