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

feat(menu): add aria-current - FRONT-4405 #3372

Merged
merged 10 commits into from
Jul 10, 2024
Merged

Conversation

emeryro
Copy link
Contributor

@emeryro emeryro commented May 2, 2024

  • add aria-current=page to identify the current page in the menu
  • add aria-current=true to identify selected menu item

Copy link

github-actions bot commented May 2, 2024

@github-actions github-actions bot temporarily deployed to pull request May 2, 2024 10:01 Inactive
Copy link
Contributor

@planctus planctus left a comment

Choose a reason for hiding this comment

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

Mmhh..if we are about to do so, we need to demo only one current item, otherwise we would be setting the current page multiple times on different links which would not be ok, but we should also update the docs related to this parameter, in the mega-menu i used this: - "is_current" (boolean) Whether the item links to the current page

@github-actions github-actions bot temporarily deployed to pull request May 6, 2024 08:21 Inactive
@emeryro
Copy link
Contributor Author

emeryro commented May 6, 2024

The markup has been updated to use aria-current="true" for first level items. That would be read as "this is the selected item in the list". So we would only have aria-current="page" on the final level link.
The same logic has been applied to the mega menu

@github-actions github-actions bot temporarily deployed to pull request May 6, 2024 08:56 Inactive
@github-actions github-actions bot temporarily deployed to pull request May 14, 2024 06:54 Inactive
@github-actions github-actions bot temporarily deployed to pull request May 21, 2024 07:16 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 1, 2024 08:29 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 2, 2024 09:56 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 9, 2024 06:48 Inactive
@planctus planctus merged commit 0900b7a into v4-dev Jul 10, 2024
7 checks passed
@planctus planctus deleted the FRONT-4405-acc-menu-current branch July 10, 2024 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants