Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(rgaa): Nav attributes and aria-current for accessibility compliance #1239

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
it "generates the labels correctly" do
expected_labels = {
description_ca: "Description (Català)",
description_machine_translations_es: "Description (automatic translation in Castellano)",
description_machine_translations_es: "Description (traducción automática a Castellano)",
progress: "Progress",
start_date: "Start date",
title_en: "Title (English)",
Expand Down
2 changes: 1 addition & 1 deletion decidim-core/app/views/decidim/pages/_tabbed.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</header>

<div class="vertical-tabs">
<nav>
<nav role="navigation" aria-label="Sous menu - <%= translated_attribute(page.title) %>">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<nav role="navigation" aria-label="Sous menu - <%= translated_attribute(page.title) %>">
<nav role="navigation" aria-label="<%= i18n.t(".navigation.aria_label", title: translated_attribute(page.title)) %>">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Translation key could just be aria_label

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, changes made 👍

<button id="dropdown-trigger-pages" data-component="dropdown" data-target="dropdown-menu-pages" data-open-md="true" data-auto-close="true">
<span>
<%= translated_attribute(page.title) %>
Expand Down
Loading