all repos — searchix @ 054d2b3bf7eb4c5a5401565e86031f22ea754062

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: improve accessibility and browser behaviour

Alan Pearce
commit

054d2b3bf7eb4c5a5401565e86031f22ea754062

parent

d6e117bb9aeb2bae23dedd51b59b6e6f139e8a4f

1 file changed, 4 insertions(+), 4 deletions(-)

changed files
M frontend/templates/blocks/results.gotmplfrontend/templates/blocks/results.gotmpl
@@ -1,10 +1,10 @@
{{- define "results" }} {{- with .Results }} {{- if gt .Total 0 }} - <section id="results"> + <section id="results" role="list" aria-label="search results"> {{ block "hits" .Hits }} {{ end }} - <footer> + <footer aria-label="pagination"> <nav id="pagination"> {{- with $.Prev }} <a class="button" href="{{ . }}" rel="prev">Prev</a>
@@ -13,11 +13,11 @@ {{- with $.Next }}
<a class="button" href="{{ . }}" rel="next">Next</a> {{- end }} </nav> - <span>{{ .Total }} results</span> + <span role="status">{{ .Total }} results</span> </footer> </section> {{- else }} - Nothing found + <span role="status">Nothing found</span> {{- end }} {{- end }} {{- end }}