Skip to content
Snippets Groups Projects
Commit addce360 authored by Olivia206's avatar Olivia206
Browse files

added search link to a11y menu

parent e07e749c
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,6 @@ class Search {
}
listen() {
this.button.addEventListener('click', () => {
this.toggle(true);
this.removedItems = this.element.querySelector('.pagefind-ui__suppressed', '.pagefind-ui__search-clear');
......
......@@ -144,4 +144,15 @@
&__message
top: calc(#{$spacing4} + #{$spacing2})
&__results-area
padding-top: calc(#{$spacing3} + #{half($spacing0)})
\ No newline at end of file
padding-top: calc(#{$spacing3} + #{half($spacing0)})
.pagefind-fixed
position: fixed
background: $color-background
bottom: 0
left: $spacing3
z-index: 10
min-width: calc(#{$spacing3} * 3)
&::after
position: absolute
right: $spacing0
\ No newline at end of file
......@@ -15,6 +15,12 @@
{{- partial "header/accessibility.html" -}}
{{- partial "header/header.html" . -}}
<main{{ if .Params.contents }} class="page-with-blocks"{{ end }} id="main" tabindex="-1">
{{ if and (site.Params.search.active) (eq site.Params.search.position "fixed")}}
<button id="search-button" class="pagefind-ui__toggle pagefind-fixed " aria-expanded="false">
{{- i18n (printf "commons.search.title") -}}
</button>
{{- partial "header/search.html" . -}}
{{ end }}
{{- block "main" . }}{{- end }}
{{- partial "hooks/before-main-end" . -}}
</main>
......
......@@ -62,8 +62,9 @@
</li>
{{- end -}}
{{ end -}}
{{ if and (eq $kind "primary") (site.Params.search.active)}}
<button class="pagefind-ui__toggle" aria-expanded="false">
{{ if and (eq $kind "primary") (site.Params.search.active) (eq site.Params.search.position "menu")}}
<button id="search-button" class="pagefind-ui__toggle" aria-expanded="false">
{{- i18n (printf "commons.search.title") -}}
</button>
{{- partial "header/search.html" . -}}
......
......@@ -2,5 +2,6 @@
<ul aria-label="{{ i18n "commons.accessibility.shortcut_navigation"}}">
<li><a href="#main">{{ i18n "commons.accessibility.main_content" }}</a></li>
<li><a href="#navigation">{{ i18n "commons.accessibility.menu" }}</a></li>
<li><a href="#search-button">{{ i18n "commons.accessibility.search" }}</a></li>
</ul>
</nav>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment