Skip to content

Commit

Permalink
Use a labeled <aside> for show tools sidebar
Browse files Browse the repository at this point in the history
The show page sidebar is currently displayed
inside a <section>; this changes it to use the <aside> element,
which is arguably more appropriate for a sidebar.

The search sidebar has an aria-label already set, but the show
sidebar did not, which also meant that it had no accessible name
despite having a landmark role.

Thus this also adds a configurable aria-label for the show page sidebar
similar to the one for the search sidebar.
  • Loading branch information
thatbudakguy committed Nov 1, 2024
1 parent 7b0797d commit eb85a74
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/layouts/catalog_result.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<%= yield %>
</section>

<section class="<%= show_sidebar_classes %>">
<aside class="<%= show_sidebar_classes %>" aria-label="<%= t('.aria.sidebar') %>">
<%= content_for(:sidebar) %>
</section>
</aside>
<% end %>

<%= render template: "layouts/blacklight/base" %>
4 changes: 4 additions & 0 deletions config/locales/blacklight.ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ ar:
aria:
container_label: التنقل الرئيسي
welcome: مرحبًا!
layouts:
catalog_result:
aria:
sidebar: أدوات
views:
pagination:
aria:
Expand Down
4 changes: 4 additions & 0 deletions config/locales/blacklight.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ de:
aria:
container_label: Hauptnavigation
welcome: Willkommen!
layouts:
catalog_result:
aria:
sidebar: Werkzeuge
views:
pagination:
aria:
Expand Down
4 changes: 4 additions & 0 deletions config/locales/blacklight.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,7 @@ en:
pagination_compact:
next: Next &raquo;
previous: "&laquo; Previous"
layouts:
catalog_result:
aria:
sidebar: Tools
4 changes: 4 additions & 0 deletions config/locales/blacklight.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ es:
aria:
container_label: Navegación principal
welcome: "¡Bienvenido!"
layouts:
catalog_result:
aria:
sidebar: Herramientas
views:
pagination:
aria:
Expand Down
4 changes: 4 additions & 0 deletions config/locales/blacklight.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ fr:
aria:
container_label: Navigation principale
welcome: Welcome!
layouts:
catalog_result:
aria:
sidebar: Outils
views:
pagination:
aria:
Expand Down
4 changes: 4 additions & 0 deletions config/locales/blacklight.hu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ hu:
aria:
container_label: Fő navigáció
welcome: Üdvözöljük!
layouts:
catalog_result:
aria:
sidebar: Eszközök
views:
pagination:
aria:
Expand Down
4 changes: 4 additions & 0 deletions config/locales/blacklight.it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ it:
aria:
container_label: Navigazione principale
welcome: Benvenuti!
layouts:
catalog_result:
aria:
sidebar: Utensili
views:
pagination:
aria:
Expand Down
4 changes: 4 additions & 0 deletions config/locales/blacklight.nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ nl:
aria:
container_label: Hoofdnavigatie
welcome: Welkom!
layouts:
catalog_result:
aria:
sidebar: Hulpmiddelen
views:
pagination:
aria:
Expand Down
4 changes: 4 additions & 0 deletions config/locales/blacklight.pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ pt-BR:
aria:
container_label: Navegação principal
welcome: Bem-Vindo!
layouts:
catalog_result:
aria:
sidebar: Ferramentas
views:
pagination:
aria:
Expand Down
4 changes: 4 additions & 0 deletions config/locales/blacklight.sq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ sq:
aria:
container_label: Lundrimi kryesor
welcome: Mirësevini!
layouts:
catalog_result:
aria:
sidebar: Mjetet
views:
pagination:
aria:
Expand Down
4 changes: 4 additions & 0 deletions config/locales/blacklight.zh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ zh:
aria:
container_label: 主导航
welcome: 欢迎!
layouts:
catalog_result:
aria:
sidebar: 工具
views:
pagination:
aria:
Expand Down

0 comments on commit eb85a74

Please sign in to comment.