Skip to content

Use 1.18's aria role for dropdown menus (#24144) #24155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions web_src/js/features/aria.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ function attachOneDropdownAria($dropdown) {
// Since #19861 we have prepared the "combobox" solution, but didn't get enough time to put it into practice and test before.
const isComboBox = $dropdown.find('input').length > 0;

const focusableRole = isComboBox ? 'combobox' : 'button';
const listPopupRole = isComboBox ? 'listbox' : 'menu';
const focusableRole = isComboBox ? 'combobox' : 'menu';
const listPopupRole = isComboBox ? 'listbox' : '';
const listItemRole = isComboBox ? 'option' : 'menuitem';

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