Skip to content

Commit 95dc5f5

Browse files
fix(ui5-li): remove redundant "Is Active" accessibility announcement
The type="Active" property indicates the item's interactive behavior (clickable), not its state. Screen readers were repeatedly announcing "Is Active" on every list item with type="Active", which was confusing and non-specific. Selected/not-selected state is already properly announced separately via aria-selected and ariaSelectedText in aria-describedby. Changes: - Remove LIST_ITEM_ACTIVE from ariaLabelledByText getter - Remove unused LIST_ITEM_ACTIVE import from ListItem.ts - Update accessibility test to verify "Is Active" is not announced - Remove LIST_ITEM_ACTIVE from default messagebundle.properties Fixes: #13265
1 parent 0b16434 commit 95dc5f5

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

packages/main/cypress/specs/List.cy.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,13 @@ describe("List - Accessibility", () => {
360360
</List>
361361
);
362362

363-
// assert
363+
// assert - "Is Active" should NOT be announced for type="Active"
364+
// The type property indicates behavior (clickable), not state (selected)
364365
cy.get("#active").invoke("prop", "_id").then(_id => {
365366
cy.get("#active")
366367
.shadow()
367368
.find(`#${_id}-invisibleText`)
368-
.should("have.text", "Is Active");
369+
.should("not.have.text", "Is Active");
369370
});
370371

371372
cy.get("#inactive").invoke("prop", "_id").then(_id => {

packages/main/src/ListItem.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import {
2626
DELETE,
2727
ARIA_LABEL_LIST_ITEM_CHECKBOX,
2828
ARIA_LABEL_LIST_ITEM_RADIO_BUTTON,
29-
LIST_ITEM_ACTIVE,
3029
LIST_ITEM_SELECTED,
3130
LIST_ITEM_NOT_SELECTED,
3231
} from "./generated/i18n/i18n-defaults.js";
@@ -475,7 +474,6 @@ abstract class ListItem extends ListItemBase {
475474
const texts = [
476475
this._accInfo.listItemAriaLabel,
477476
this.accessibleName,
478-
this.typeActive ? ListItem.i18nBundle.getText(LIST_ITEM_ACTIVE) : undefined,
479477
].filter(Boolean);
480478

481479
return texts.join(" ");

packages/main/src/i18n/messagebundle.properties

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,6 @@ LINK_EMPHASIZED=Emphasized
360360
#XACT: ARIA announcement for the interactive nature of the list
361361
LIST_ROLE_DESCRIPTION=List with interactive items. To move to the content press F2.
362362

363-
#XACT: ARIA announcement for the active clickable list items
364-
LIST_ITEM_ACTIVE=Is Active
365-
366363
#XACT: ARIA announcement for the position of the list items in an entire list
367364
LIST_ITEM_POSITION=List item {0} of {1}
368365

0 commit comments

Comments
 (0)