Skip to content

Commit 03b6e79

Browse files
Use 1.18's aria role for dropdown menus (#24144) (#24155)
Backport #24144 Co-authored-by: silverwind <[email protected]>
1 parent 463e144 commit 03b6e79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web_src/js/features/aria.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ function attachOneDropdownAria($dropdown) {
3434
// Since #19861 we have prepared the "combobox" solution, but didn't get enough time to put it into practice and test before.
3535
const isComboBox = $dropdown.find('input').length > 0;
3636

37-
const focusableRole = isComboBox ? 'combobox' : 'button';
38-
const listPopupRole = isComboBox ? 'listbox' : 'menu';
37+
const focusableRole = isComboBox ? 'combobox' : 'menu';
38+
const listPopupRole = isComboBox ? 'listbox' : '';
3939
const listItemRole = isComboBox ? 'option' : 'menuitem';
4040

4141
// make the item has role=option/menuitem, add an id if there wasn't one yet, make items as non-focusable

0 commit comments

Comments
 (0)