-
Notifications
You must be signed in to change notification settings - Fork 4
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 wcag search filters navigation #1240
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look great to me, well done!
I do have a small point of consideration regarding the third line of _filters.html.erb
, specifically the default value. It may not be strictly necessary, but it seems like a good safeguard against potential errors.
Thanks for the feedback! I agree that the default: "Search filters" parameter might not always be necessary if the key decidim.searches.filters.title is always present. Do you think it’s better to keep it as a safeguard or remove it for simplicity, @Quentinchampenois ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's hard for me to understand changes,
The nav
tag seems good with the right role and the aria-labelledby
. However the value of aria-labelledby
should match the ID of the currently existing H1 title (cf: 32 Results for the search: "" )
We shall not create a new h1 tag but add an ID to the existing H1 to match it
<span><%= searchable_resource_human_name(type) %></span> | ||
<nav role="navigation" aria-labelledby="filters-title"> | ||
<h1 id="filters-title" class="sr-only"> | ||
<%= t("decidim.searches.filters.title", default: "Search filters") %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, the default parameter is not necessary in this case
<%= t("decidim.searches.filters.title", default: "Search filters") %> | |
<%= t("decidim.searches.filters.title") %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! The changes have been implemented for better dynamic approach
🎩 What?
Updated the search filters container to improve accessibility compliance. Changes include:
<nav>
element withrole="navigation"
to define the navigation region.aria-labelledby
attribute referencing a hidden<h1>
to programmatically name the navigation area for screen readers.🎩 Why?
These changes address accessibility concerns highlighted during the city of Lyon rgaa audit, and align with WCAG 2.1 standards:
🔗 WCAG References:
🎩 Related to
In grist, array Diagnostique Decidim, line 31
📋 Subtasks
CHANGELOG
entry.📷 Screenshots (optional)