Skip to content

fix(core): screen reader announces selection state for fd-list items#14322

Merged
MariaIDineva merged 4 commits into
mainfrom
fix/core-list-screen-reader-improvements
Jul 6, 2026
Merged

fix(core): screen reader announces selection state for fd-list items#14322
MariaIDineva merged 4 commits into
mainfrom
fix/core-list-screen-reader-improvements

Conversation

@MariaIDineva

@MariaIDineva MariaIDineva commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Related Issue(s)

closes #14316

Description

Problem

When fd-list is 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-selected alone is not sufficient — some screen reader / browser combinations don't announce it for role="listitem" elements, or announce it multiple times when combined with inner checkbox state.

Fix

aria-describedby span — a visually-hidden <span> inside each selectable list item shows "Selected" or "Not Selected". The host <li> references it via aria-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

File Change
libs/core/list/list-item/list-item.component.html Conditionally rendered hidden span with "Selected" / "Not Selected"; only shown for selectable items
libs/core/list/list-item/list-item.component.ts aria-describedby on host, _selectionDescribedById / _isSelectable getters,_syncSelectionFromControl(), inject FD_LIST_COMPONENT, FdTranslatePipe and resolveTranslationSignal imports
libs/core/list/list-item/list-item.component.spec.ts Tests for sr-only span presence, aria-describedby wiring, correct text on toggle
libs/core/list/list-component.interface.ts Expose existing selection property on the interface so list items can read it
libs/core/list/list.component.scss Add .fd-list__item--sr-only visually-hidden CSS class
libs/i18n/src/lib/models/fd-language.ts New coreList section with listItemSelectedAriaLabel and listItemNotSelectedAriaLabel
libs/i18n/src/lib/models/fd-language-key-identifier.ts Register both new keys
libs/i18n/src/lib/translations/translations.ts + all locales coreList: { listItemSelectedAriaLabel: 'Selected', listItemNotSelectedAriaLabel: 'Not Selected' }

Screenshots

Before:

Screenshot 2026-06-30 at 17 04 19 Screenshot 2026-06-30 at 17 05 23

After:

Screenshot 2026-06-30 at 17 02 24 Screenshot 2026-06-30 at 17 02 54

@netlify

netlify Bot commented Jun 30, 2026

Copy link
Copy Markdown

Deploy Preview for fundamental-ngx ready!

Name Link
🔨 Latest commit 808afc6
🔍 Latest deploy log https://app.netlify.com/projects/fundamental-ngx/deploys/6a4681fec98650000884f414
😎 Deploy Preview https://deploy-preview-14322--fundamental-ngx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown

♿ Accessibility Report

973/973 routes passed axe-core audit

@MariaIDineva MariaIDineva added the accessibility use this label for any issue or enhancement related to screenreader/keyboard/etc support label Jun 30, 2026
@MariaIDineva MariaIDineva added this to the Sprint 160 - July 2026 milestone Jun 30, 2026
@MariaIDineva MariaIDineva merged commit 3da2167 into main Jul 6, 2026
20 checks passed
@MariaIDineva MariaIDineva deleted the fix/core-list-screen-reader-improvements branch July 6, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility use this label for any issue or enhancement related to screenreader/keyboard/etc support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Accessibility]: Core List in selection mode screenreader should read the status when go through and toggle the selection items.

3 participants