Open plastikschnitzer opened 2 years ago
Hi @plastikschnitzer. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
@magento give me 2.4-develop instance
Hi @plastikschnitzer. Thank you for your request. I'm working on Magento instance for you.
Hi @plastikschnitzer, here is your Magento Instance: https://fa8bb1ac816acdac54a2555f850e34c5.instances.magento-community.engineering Admin access: https://fa8bb1ac816acdac54a2555f850e34c5.instances.magento-community.engineering/admin_526c Login: 368d8f43 Password: 5b7a871d26eb
Yes, I can confirm the issue can be reproduced on Magento-2.4-develop
Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
@magento give me 2.4-develop instance
Hi @engcom-November. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-November, here is your Magento Instance: https://fa8bb1ac816acdac54a2555f850e34c5.instances.magento-community.engineering Admin access: https://fa8bb1ac816acdac54a2555f850e34c5.instances.magento-community.engineering/admin_411d Login: 16c4a72f Password: 0883c424c168
Hi @plastikschnitzer , Thank you for reporting and collaboration. Verified the behavior on Magento 2.4-develop branch and is reproducible. But however, Accessibility: WAI-ARIA is not mentioned anywhere in Magento docs instead mentioned as Web Content Accessibility Guidelines (WCAG) 2.0. Kindly refer the document and provide supporting docs/proofs that support ARIA compliance for Magento pages. Thank you.
Thank you @engcom-November thank you for confirming and I am happy to precise further: I was stumbling over this issue running a default google lighthouse test on the shop: https://web.dev/measure Accessibility and UX is becoming more and more a ranking factor in search engines, Magento provides the role element already, but it needs a slight modification as stated in my opening posting with the code proposal, it should work then as expected by WAI-ARIA and search engines will be happy ;-) Further details can be found on the WAI-ARIA documentation: https://www.w3.org/TR/wai-aria-1.1/#menu and https://www.w3.org/TR/wai-aria-1.1/#menuitem
As the nesting in Magento has the <li>
element without any role in between the <ul role="menu">
and <a href="" role="menuitem">
, the WAI-ARIA compatibility check fails as it expects a role on the <li>
. <li role="none">
or <li role="presentation">
excludes the <li>
from the nesting tree and the test will be passed.
Check https://www.w3.org/TR/wai-aria-1.1/#presentation and its examples.
I have a quick fix which works for the product category menu, insert the code into Content –> Configuration –> Edit on highest level –> Footer –> Miscellaneous HTML
<script>
let mainnav = document.getElementById("store.menu");
let addmenurole = mainnav.getElementsByTagName("li");
for (let i = 0; i < addmenurole.length; i++) {
addmenurole[i].setAttribute("role","none");}
</script>
This will add role="none"
to the li
of the main menu and fix the WAI-ARIA compatibility issues. A proper fix should be introduced in the same place where the other role attributes are set, this is just a quick temporary fix, also to demonstrate how the markup should look like.
Thank you for the response @plastikschnitzer . We are considering this as feature request but not a bug as WAI-ARIA compliance is not mentioned anywhere in Magento docs.
This demo website is in 2.4.0 : demo
As you can see the <li>
in the menu have the attribute role="presentation"
Also my websites in 2.4.3 does not have the issue.
My websites in 2.4.4 have the issue.
It is not a feature request since it was working properly in the previous versions.
@magento I am working on this
Hi @mirianstangherlin! :wave:
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team
command to join Contributors team.
@magento I am working on this
Preconditions and environment
Steps to reproduce
Navigate to storeview analyze html code of menu for correct ARIA markup
Expected result
Menu should be structured according to ARIA schema the following way:
Actual result
As the
li
tag has no role, the child element for the menu role is missing and the parent element for the menuitem role is missing.Users who rely on accessibility tools might run into a deadend here.
Additional information
This is also a ranking factor for search engines and part of the lighthouse check, should be fixed!
Release note
No response
Triage and priority