all repos — searchix @ 76dcd62d21e962479926f2f2b7dece202ea0b666

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

fix: declare current nav item in a more accessible manner https://github.com/kevquirk/simple.css/wiki/Utility-elements-and-classes#current-nav-item https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-current

Alin
commit

76dcd62d21e962479926f2f2b7dece202ea0b666

parent

3b0308424ed36884552198362e81e3010eead7e1

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

changed files
M internal/components/page.gointernal/components/page.go
@@ -8,7 +8,6 @@ "alin.ovh/searchix/frontend"
"alin.ovh/searchix/internal/config" g "alin.ovh/gomponents" - c "alin.ovh/gomponents/components" . "alin.ovh/gomponents/html" )
@@ -71,9 +70,10 @@ Nav(
H1(A(Href("/"), g.Text("Searchix"))), g.If(len(tdata.Sources) > 0, A( - c.Classes{ - "current": tdata.Source.Importer == config.All, - }, + g.If( + tdata.Source.Importer == config.All, + Aria("current", "page"), + ), g.If( tdata.Source.Importer == config.All, Href("/"),
@@ -85,7 +85,7 @@ ),
g.Map(tdata.Sources, func(source config.Source) g.Node { if tdata.Source.Importer != config.All && tdata.Source.Name == source.Name { return A( - Class("current"), + Aria("current", "page"), Href( joinPath( "/",