Skip to content

Commit fa5fc70

Browse files
committed
fix(material/select): adds cdkFocusTrap to attempt to make options focuable
Attempts to fix bug in Angular Components Select Component where the options in the listbox are not accessible/focusable on mobile. When swiping right to access the listbox the focus moves to the next focusable item rather than into the listbox of options. This fix adds cdkFocusTrap and cdkFocusAutoCapture to attempt to remedy that. Fixes b/285945157
1 parent a6835ef commit fa5fc70

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/material/select/select.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
<div
4646
#panel
4747
role="listbox"
48+
cdkFocusTrap
49+
cdkTrapFocusAutoCapture
4850
tabindex="-1"
4951
class="mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open {{ _getPanelTheme() }}"
5052
[attr.id]="id + '-panel'"

0 commit comments

Comments
 (0)