Fix(rgaa): Nav attributes and aria-current for accessibility compliance#1239
Closed
BarbaraOliveira13 wants to merge 7 commits intodevelopfrom
Closed
Fix(rgaa): Nav attributes and aria-current for accessibility compliance#1239BarbaraOliveira13 wants to merge 7 commits intodevelopfrom
BarbaraOliveira13 wants to merge 7 commits intodevelopfrom
Conversation
Quentinchampenois
requested changes
Dec 18, 2024
Quentinchampenois
left a comment
There was a problem hiding this comment.
The aria-label must be translated in locales files, in English only
|
|
||
| <div class="vertical-tabs"> | ||
| <nav> | ||
| <nav role="navigation" aria-label="Sous menu - <%= translated_attribute(page.title) %>"> |
There was a problem hiding this comment.
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)) %>"> |
There was a problem hiding this comment.
Translation key could just be aria_label
Author
There was a problem hiding this comment.
thanks, changes made 👍
Quentinchampenois
requested changes
Dec 19, 2024
| <% pages.each do |sibling| %> | ||
| <li class="<%= "is-active" if page == sibling %>" role="menuitem"> | ||
| <%= link_to translated_attribute(sibling.title), page_path(sibling.slug) %> | ||
| <%= link_to translated_attribute(sibling.title), page_path(sibling.slug), aria_current: ("true"if page == sibling) %> |
There was a problem hiding this comment.
Suggested change
| <%= link_to translated_attribute(sibling.title), page_path(sibling.slug), aria_current: ("true"if page == sibling) %> | |
| <%= link_to translated_attribute(sibling.title), page_path(sibling.slug), aria_current: (page == sibling).to_s %> |
There was a problem hiding this comment.
Condition in itself returns a TrueClass or FalseClass, you can use the condition return as string directly
Quentinchampenois
approved these changes
Dec 23, 2024
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. @carolromero & @xabier feel free to chime in. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What?
Two parts:
🎩 Why?
This issue originates from an accessibility audit funded by the city of Lyon, targeting compliance with RGAA and corresponding WCAG standards. The changes ensure clearer navigation and improved usability for assistive technologies.
📌 Related Issues
📋 Subtasks
CHANGELOGentry📷 Screenshots (optional)