Skip to content

Commit 0a4638a

Browse files
[people-picker] Accessibility, narration of drop down people (#1500)
Co-authored-by: Sébastien Levert <[email protected]>
1 parent 95c8403 commit 0a4638a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/mgt-components/src/components/mgt-people-picker/mgt-people-picker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,7 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
811811
return html`
812812
<li
813813
role="option"
814+
@keydown="${this.onUserKeyDown}"
814815
aria-label=" ${this.strings.suggestedContact} ${person.displayName}"
815816
id="${person.displayName}"
816817
tabindex="0"
@@ -1574,10 +1575,11 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
15741575
}
15751576

15761577
// set selected background
1577-
const focusedItem = peopleList.children[this._arrowSelectionCount];
1578+
const focusedItem = peopleList.children[this._arrowSelectionCount] as HTMLElement;
15781579
if (focusedItem) {
15791580
focusedItem.classList.add('focused');
15801581
focusedItem.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });
1582+
focusedItem.focus();
15811583
}
15821584
}
15831585
}

0 commit comments

Comments
 (0)