aboutsummaryrefslogtreecommitdiff
path: root/_content/site.tmpl
diff options
context:
space:
mode:
authorprudhvikrishna <prudhvikrishna@google.com>2023-07-14 12:35:47 -0700
committerGopher Robot <gobot@golang.org>2023-07-17 15:45:47 +0000
commit647c4b2c5ac6204d03a40c19f7ec23ccd272caea (patch)
tree7af2ebeaca69e4f9e3929122c31accc1c1fc8428 /_content/site.tmpl
parent57cac55d243dae0416e0776b24c9e84e0fec777a (diff)
downloadgo-x-website-647c4b2c5ac6204d03a40c19f7ec23ccd272caea.tar.xz
_content: fix for dropdown to not autoopen when receive focus
Change-Id: Iee3897aa4f5c1311141411ec44193751cb516e4d Reviewed-on: https://go-review.googlesource.com/c/website/+/509857 Auto-Submit: Jamal Carvalho <jamal@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> Reviewed-by: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to '_content/site.tmpl')
-rw-r--r--_content/site.tmpl7
1 files changed, 5 insertions, 2 deletions
diff --git a/_content/site.tmpl b/_content/site.tmpl
index bcd54a6b..975faf89 100644
--- a/_content/site.tmpl
+++ b/_content/site.tmpl
@@ -65,9 +65,12 @@
{{- $currentPage := .}}
{{- range $menus.main}}
<li class="Header-menuItem {{if strings.HasPrefix $currentPage.URL .url}} Header-menuItem--active{{end}}">
- <a href="{{if .children}}#{{else}}{{.url}}{{end}}" {{if .children}}aria-haspopup="true" class="js-desktop-menu-hover"{{end}}>
- {{.name}} {{if .children}}<i class="material-icons">arrow_drop_down</i>{{end}}
+ <a href="{{if .children}}#{{else}}{{.url}}{{end}}" {{if .children}} class="js-desktop-menu-hover"{{end}} aria-label={{.name}} aria-describedby="dropdown-description">
+ {{.name}} {{if .children}}<i class="material-icons" aria-hidden="true">arrow_drop_down</i>{{end}}
</a>
+ <div class="screen-reader-only" id="dropdown-description" hidden>
+ Press Enter to activate/deactivate dropdown
+ </div>
{{- if .children}}
<ul class="Header-submenu js-desktop-submenu-hover" aria-label="submenu">
{{- range .children}}