fix(core): screen reader announces selection state for fd-list items#14322
Merged
Conversation
✅ Deploy Preview for fundamental-ngx ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
♿ Accessibility Report✅ 973/973 routes passed axe-core audit |
InnaAtanasova
approved these changes
Jul 2, 2026
mikerodonnell89
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue(s)
closes #14316
Description
Problem
When
fd-listis used in selection mode, screen readers do not announce whether a list item is selected. Navigating to a selected item produces no "Selected" announcement.Root cause
aria-selectedalone is not sufficient — some screen reader / browser combinations don't announce it forrole="listitem"elements, or announce it multiple times when combined with inner checkbox state.Fix
aria-describedbyspan — a visually-hidden<span>inside each selectable list item shows "Selected" or "Not Selected". The host<li>references it viaaria-describedby, so the state is announced once when the item receives focus.The span is only announced when the parent list has
[selection]="true". Plain list items (icon lists, link lists, etc.) are unaffected.Changed files
libs/core/list/list-item/list-item.component.htmllibs/core/list/list-item/list-item.component.tsaria-describedbyon host,_selectionDescribedById/_isSelectablegetters,_syncSelectionFromControl(), injectFD_LIST_COMPONENT,FdTranslatePipeandresolveTranslationSignalimportslibs/core/list/list-item/list-item.component.spec.tsaria-describedbywiring, correct text on togglelibs/core/list/list-component.interface.tsselectionproperty on the interface so list items can read itlibs/core/list/list.component.scss.fd-list__item--sr-onlyvisually-hidden CSS classlibs/i18n/src/lib/models/fd-language.tscoreListsection withlistItemSelectedAriaLabelandlistItemNotSelectedAriaLabellibs/i18n/src/lib/models/fd-language-key-identifier.tslibs/i18n/src/lib/translations/translations.ts+ all localescoreList: { listItemSelectedAriaLabel: 'Selected', listItemNotSelectedAriaLabel: 'Not Selected' }Screenshots
Before:
After: