Skip to content

Commit 9438b3b

Browse files
fix: add tabindex to activedescendant (#3121)
Signed-off-by: Akshat Patel <[email protected]> Co-authored-by: Akshat Patel <[email protected]>
1 parent 440af1d commit 9438b3b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dropdown/list/dropdown-list.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import { ScrollCustomEvent } from "./scroll-custom-event.interface";
5757
class="cds--list-box__menu cds--multi-select"
5858
(scroll)="emitScroll($event)"
5959
(keydown)="navigateList($event)"
60-
tabindex="-1"
60+
tabindex="0"
6161
[attr.aria-label]="ariaLabel"
6262
[attr.aria-activedescendant]="highlightedItem">
6363
<li
@@ -67,6 +67,7 @@ import { ScrollCustomEvent } from "./scroll-custom-event.interface";
6767
class="cds--list-box__menu-item"
6868
[attr.aria-selected]="item.selected"
6969
[id]="getItemId(i)"
70+
[attr.tabindex]="highlightedItem === getItemId(i) ? 0 : null"
7071
[attr.title]=" showTitles ? item.content : null"
7172
[attr.disabled]="item.disabled ? true : null"
7273
[ngClass]="{

0 commit comments

Comments
 (0)