Merge pull request #19823 from overleaf/rd-navbar-pug-a11y

[web] Announce buttons as menu items in the navigation bar and allow tabbing within the menu

GitOrigin-RevId: 138fef3369bf5c89487e673ab42c06b7c13bcf48
This commit is contained in:
Rebeka Dekany 2024-08-09 11:44:36 +02:00 committed by Copybot
parent 972fbb7c67
commit 57b3871c1c
2 changed files with 4 additions and 1 deletions

View file

@ -16,7 +16,7 @@ mixin dropdown-menu-item
mixin dropdown-menu-link-item
+dropdown-menu-item
a(role="menuitem", tabindex="-1").dropdown-item&attributes(attributes)
a(role="menuitem").dropdown-item&attributes(attributes)
block
mixin dropdown-menu-divider

View file

@ -45,6 +45,7 @@ nav.navbar.navbar-default.navbar-main.navbar-expand-lg
aria-haspopup="true",
aria-expanded="false",
data-bs-toggle="dropdown"
role="menuitem"
)
| Admin
span.caret
@ -80,6 +81,7 @@ nav.navbar.navbar-default.navbar-main.navbar-expand-lg
aria-haspopup="true",
aria-expanded="false",
data-bs-toggle="dropdown"
role="menuitem"
)
| !{translate(item.text)}
span.caret
@ -150,6 +152,7 @@ nav.navbar.navbar-default.navbar-main.navbar-expand-lg
aria-haspopup="true",
aria-expanded="false",
data-bs-toggle="dropdown"
role="menuitem"
)
| #{translate('Account')}
span.caret