mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 20:17:03 +01:00
Backport #24144 Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
parent
463e144d97
commit
03b6e7900b
1 changed files with 2 additions and 2 deletions
|
@ -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.
|
// 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 isComboBox = $dropdown.find('input').length > 0;
|
||||||
|
|
||||||
const focusableRole = isComboBox ? 'combobox' : 'button';
|
const focusableRole = isComboBox ? 'combobox' : 'menu';
|
||||||
const listPopupRole = isComboBox ? 'listbox' : 'menu';
|
const listPopupRole = isComboBox ? 'listbox' : '';
|
||||||
const listItemRole = isComboBox ? 'option' : 'menuitem';
|
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
|
// make the item has role=option/menuitem, add an id if there wasn't one yet, make items as non-focusable
|
||||||
|
|
Loading…
Reference in a new issue