Skip to content

Conversation

essjay05
Copy link
Contributor

Adds a visually hidden span as a child of the accordion header/button which has a generated id for the associated accordion content panel to reference if/when the accordion header/button is disabled. This should allow screen readers to have an active reference for aria-labelledby to reference.

Fixes b/438312273

@essjay05 essjay05 added the dev-app preview When applied, previews of the dev-app are deployed to Firebase label Aug 28, 2025
Copy link

github-actions bot commented Aug 28, 2025

Deployed dev-app for 3b5b3a2 to: https://ng-dev-previews-comp--pr-angular-components-31804-dev-ewlwd9xn.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@essjay05 essjay05 force-pushed the add-proper-description-for-disabled-region branch from 7901e82 to 21ceb3c Compare August 29, 2025 16:24
…ove screen reader accessibility

Adds a visually hidden span as a child of the accordion header/button
which has a generated id for the associated accordion content panel to
reference if/when the accordion header/button is disabled. This should
allow screen readers to have an active reference for aria-labelledby to
reference.

Fixes b/438312273
…ccordion trigger parent element

Updates previous change to move the visually hidden span from being a
child of the accordion trigger button, to being a child of the parent
wrapping the accordion trigger. This prevents it from being hidden by
aria-disabled or disabled attributes when being a child of the trigger.
…den span

Updates previous fix to add tabindex -1 to make the visually hidden
span not focusable.
… accurately

Updates previous changes to implement disabled and expanded states of
the accordion trigger button to the visually hidden label to ensure
the exact state of the button is communicated to the screen reader. Also
updates previous change to pass the visuallyHiddenId to the AccordionTriggerPattern
as recommended by Cheng. These updates should improve id consistency
as well as an improved label which fully describes the accordion trigger
state to screen readers.
@essjay05 essjay05 force-pushed the add-proper-description-for-disabled-region branch from abbd8d4 to 177869d Compare September 2, 2025 16:58
Updates previous changes to fix lint errors.
Updates previous change by removing hardcoded strings.
@essjay05 essjay05 closed this Sep 4, 2025
@essjay05
Copy link
Contributor Author

essjay05 commented Sep 4, 2025

Solution provided in #31817

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-app preview When applied, previews of the dev-app are deployed to Firebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant