mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-27 07:32:45 +08:00
Improve a11y document and dropdown item (#29753)
Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user