Skip to content

Commit 880b71c

Browse files
authoredMay 22, 2024
fix(ui5-side-navigation-item): "selected" is no longer announced on every focused item (#9037)
Fixes #8790

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed
 

‎packages/fiori/src/SideNavigationItem.hbs

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
tabindex="{{effectiveTabIndex}}"
8484
aria-expanded="{{_expanded}}"
8585
aria-current="{{_ariaCurrent}}"
86+
aria-selected="{{selected}}"
8687
title="{{_tooltip}}"
8788
aria-owns="{{_groupId}}"
8889
href="{{_href}}"
@@ -118,6 +119,7 @@
118119
tabindex="{{effectiveTabIndex}}"
119120
aria-expanded="{{_expanded}}"
120121
aria-current="{{_ariaCurrent}}"
122+
aria-selected="{{selected}}"
121123
title="{{_tooltip}}"
122124
aria-owns="{{_groupId}}"
123125
>

‎packages/fiori/src/SideNavigationSubItem.hbs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
@focusin="{{_onfocusin}}"
1111
tabindex="{{effectiveTabIndex}}"
1212
aria-current="{{_ariaCurrent}}"
13+
aria-selected="{{selected}}"
1314
title="{{_tooltip}}"
1415
href="{{_href}}"
1516
target="{{_target}}"
@@ -37,6 +38,7 @@
3738
@focusin="{{_onfocusin}}"
3839
tabindex="{{effectiveTabIndex}}"
3940
aria-current="{{_ariaCurrent}}"
41+
aria-selected="{{selected}}"
4042
title="{{_tooltip}}"
4143
>
4244
{{#if icon}}

‎packages/fiori/test/specs/SideNavigation.spec.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,12 @@ describe("Component Behavior", () => {
187187

188188
assert.strictEqual(await sideNavigationTree.getAttribute("aria-roledescription"), roleDescription, "Role description of the SideNavigation tree element is correctly set");
189189
assert.notExists(await items[0].getAttribute("aria-roledescription"),"Role description of the SideNavigation tree item is not set");
190-
190+
assert.strictEqual(await items[0].getAttribute("aria-selected"), "true", "'aria-selected' is set explicitly");
191191
assert.strictEqual(await sideNavigationTree.getAttribute("aria-roledescription"), roleDescription, "Role description of the SideNavigation tree is correctly set");
192192
assert.notExists(await items[1].getAttribute("aria-haspopup"), "There is no 'aria-haspopup'");
193193

194+
assert.strictEqual(await items[3].getAttribute("aria-selected"), "false", "'aria-selected' is set explicitly");
195+
194196
// fixed items
195197
assert.strictEqual(await sideNavigationFixedTree.getAttribute("aria-roledescription"), roleDescription, "Role description of the SideNavigation fixed tree element is correctly set");
196198
assert.notExists(await items[13].getAttribute("aria-roledescription"), "Role description of the SideNavigation fixed tree item is not set");

0 commit comments

Comments
 (0)
Please sign in to comment.