From 57b3871c1c5ac984f5797b624dbd723eb500d1b0 Mon Sep 17 00:00:00 2001 From: Rebeka Dekany <50901361+rebekadekany@users.noreply.github.com> Date: Fri, 9 Aug 2024 11:44:36 +0200 Subject: [PATCH] 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 --- services/web/app/views/_mixins/navbar.pug | 2 +- services/web/app/views/layout/navbar-marketing-bootstrap-5.pug | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/services/web/app/views/_mixins/navbar.pug b/services/web/app/views/_mixins/navbar.pug index bd72cf2939..274332f99c 100644 --- a/services/web/app/views/_mixins/navbar.pug +++ b/services/web/app/views/_mixins/navbar.pug @@ -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 diff --git a/services/web/app/views/layout/navbar-marketing-bootstrap-5.pug b/services/web/app/views/layout/navbar-marketing-bootstrap-5.pug index 2c1c9407e4..2f81177b8d 100644 --- a/services/web/app/views/layout/navbar-marketing-bootstrap-5.pug +++ b/services/web/app/views/layout/navbar-marketing-bootstrap-5.pug @@ -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