Improve a11y document and dropdown item (#29753)
Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
parent
3e94ac5c7c
commit
e01b0014de
3 changed files with 7 additions and 7 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