-
Notifications
You must be signed in to change notification settings - Fork 35
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(mega-menu): Adding aria-describedby in info link - FRONT-4520 #3486
feat(mega-menu): Adding aria-describedby in info link - FRONT-4520 #3486
Conversation
planctus
commented
Jul 15, 2024
•
edited by emeryro
Loading
edited by emeryro
- add aria-describedby in the info item title
- add support of "space" to open menu items
@@ -36,6 +36,7 @@ module.exports = { | |||
path: exampleLink, | |||
info: { | |||
title: 'About the News and Media', | |||
title_id: 'about-the-news-id', |
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.
do we really need to set a new parameter for this? Couldn't we just generate a unique id based on the global mega menu id?
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 the usual situation where we need to generate ids but we cannot use those for the tests, if you prefer i can remove these from the specs and only add them in the tests, in the template if this is not provided an automatic id is generated
I may be mixing up things a little, as the id has to be set on the menu item title, but you get the idea |
I've added support for using Space on the menu items in this pull request. |
This id are fine 👍, but now there is a small issue with the space behavior. |
…y into FRONT-4520-Yuppy-uh-id-and-aria-desribed-by-hurra
…ithub.com:ec-europa/europa-component-library into FRONT-4520-Yuppy-uh-id-and-aria-desribed-by-hurra
To be honest there was no intention to have a further action pressing again on the space bar. When you click Enter, for instance, a following press on it will not close the dropdown, it will instead behave as the Tab. Anyway, now we perform a click on the element when using the space bar, so it behaves as if it was clicked. |