Improve a11y document and dropdown item (#29753)
Co-authored-by: silverwind <me@silverwind.io> (cherry picked from commit e01b0014de5b732181ac42c03a77c21219f88c6a)
This commit is contained in:
parent
f99cf911e8
commit
1d4bf7e211
2 changed files with 6 additions and 6 deletions
|
@ -38,7 +38,7 @@ function updateMenuItem(dropdown, item) {
|
|||
if (!item.id) item.id = generateAriaId();
|
||||
item.setAttribute('role', dropdown[ariaPatchKey].listItemRole);
|
||||
item.setAttribute('tabindex', '-1');
|
||||
for (const a of item.querySelectorAll('a')) a.setAttribute('tabindex', '-1');
|
||||
for (const el of item.querySelectorAll('a, input, button')) el.setAttribute('tabindex', '-1');
|
||||
}
|
||||
|
||||
// make the label item and its "delete icon" has correct aria attributes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue