Skip to content

Render accordion aria-expanded as "true"/"false" strings (CS-12256)#5553

Merged
burieberry merged 1 commit into
mainfrom
cs-12256-accordionitem-renders-aria-expanded-as-an-empty-attribute
Jul 21, 2026
Merged

Render accordion aria-expanded as "true"/"false" strings (CS-12256)#5553
burieberry merged 1 commit into
mainfrom
cs-12256-accordionitem-renders-aria-expanded-as-an-empty-attribute

Conversation

@burieberry

@burieberry burieberry commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This PR was created as a result of a failing issue-tracker live card test.

Background

The AccordionItem trigger bound aria-expanded to a raw boolean, which Glimmer renders as an empty-valued attribute when open and removes entirely when closed. Both states are invalid for aria-expanded, an enumerated attribute whose meaningful values are the strings "true" and "false" — and the attribute should stay present on a toggle so assistive technology announces the collapsed state. Every Accordion in the app was affected.

Changes

  • The trigger renders aria-expanded={{if @isOpen 'true' 'false'}}, matching how the content region already handles aria-hidden.
  • The chevron-rotation CSS keyed off attribute presence ([aria-expanded]), which only worked because of the presence-only-when-open bug; it now targets [aria-expanded='true'].
  • New integration test pins the "true"/"false" contract plus the data-state/aria-hidden signals on the content region, so a regression here fails loudly instead of silently.

Testing

Full boxel-ui test-app suite passes (394/394) including the new accordion test.

🤖 Generated with Claude Code

Binding a raw boolean stamps an empty-valued attribute when open and
removes it when closed — both invalid for the enumerated aria-expanded
attribute. The chevron-rotation selector keyed off attribute presence,
so it moves to [aria-expanded='true'] now that the attribute is always
present.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Preview deployments

Host Test Results

    1 files      1 suites   3h 4m 8s ⏱️
3 553 tests 3 538 ✅ 15 💤 0 ❌
3 572 runs  3 557 ✅ 15 💤 0 ❌

Results for commit c551428.

Realm Server Test Results

    1 files      1 suites   16m 34s ⏱️
1 883 tests 1 883 ✅ 0 💤 0 ❌
1 962 runs  1 962 ✅ 0 💤 0 ❌

Results for commit c551428.

@burieberry
burieberry requested a review from a team July 20, 2026 21:51
@burieberry
burieberry merged commit 9ee7263 into main Jul 21, 2026
73 of 74 checks passed
@burieberry
burieberry deleted the cs-12256-accordionitem-renders-aria-expanded-as-an-empty-attribute branch July 21, 2026 15:13
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