7
0
Fork 0

Buttons voorzien van een label voor verbeterde toegankelijkheid

This commit is contained in:
Michael Boelen 2023-05-22 11:46:34 +02:00
parent 019a7e145b
commit 49ff9a64c3

View file

@ -19,8 +19,8 @@
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
{{ if .Children }}
<li>
<button type="button" aria-haspopup="true" aria-expanded="true" aria-controls="dropdown-{{ $.Scratch.Get "counter" }}"></button>
<a href="{{ .URL }}">{{ .Name }}</a>
<button type="button" aria-haspopup="true" aria-expanded="true" aria-controls="dropdown-{{ $.Scratch.Get "counter" }}" aria-labelledby="button-link-{{ $.Scratch.Get "counter" }}"></button>
<a id="button-link-{{ $.Scratch.Get "counter" }}" href="{{ .URL }}">{{ .Name }}</a>
<ul class="dropdown" id="dropdown-{{ $.Scratch.Get "counter" }}">
{{ range .Children }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
@ -29,13 +29,13 @@
</li>
{{ else }}
<li>
<button type="button" aria-haspopup="true" aria-expanded="true"></button>
<a href="{{ .URL }}">{{ .Name }}</a>
<button type="button" aria-haspopup="true" aria-expanded="true" aria-labelledby="button-link-{{ $.Scratch.Get "counter" }}"></button>
<a id="button-link-{{ $.Scratch.Get "counter" }}" href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
{{ end }}
<li>
<button type="button" aria-haspopup="false" aria-expanded="true"></button>
<button type="button" aria-haspopup="false" aria-expanded="true" aria-label="Zoeken"></button>
<a href="{{ relLangURL "/zoeken/"}}">{{ partial "show-svg-icon.html" (dict "context" . "icon" "magnifying-glass" "class" "shownormal") }}</a>
</li>
</ul>