- Issue created by @medinasod
- š®š³India ravi kant Jaipur
The "tabindex" is added already so no need to change span to button.
- š·šŗRussia qzmenko Novosibirsk
+1 for this.
When using the "span" tag, the screen reader does not read aloud the information that the menu has been opened. - Assigned to irene_dobbs
- First commit to issue fork.
- Merge request !89Issue #3378533: change unlinked submenu toggles from <span> to <button> for... ā (Open) created by molly_n
- Status changed to Needs review
over 1 year ago 8:49pm 1 May 2024 - šŗšøUnited States molly_n
Patch in #2 didn't distinguish between unlinked items that function as submenu toggles and those that do not (e.g. submenu group headers). Created a merge request that addresses this distinction.
- šŗšøUnited States frogdog_tech
Just ran into this issue and appreciate the previous work done here.
Would it perhaps be better to simply add the `type="button"` and `role="button"` attributes to the span instead of changing the element type? I can imagine scenarios where switching from span/button could have someone run afoul in previously implemented css/js selectors?
- šŗšøUnited States kc2bj
We just ran into issue as well where our accessibility checks flag this. Will this be added in the next version update? Thank you for the work done!
- šÆš“Jordan ammar qala
When a menu item has no link but includes children, it now renders as a
<span>
withrole="button"
Tested and verified with Google Lighthouse accessibility audit
- šÆš“Jordan ammar qala
I realized that the patch I submitted earlier was incorrect and did not address the issue properly.
I apologize for the confusion.Iām now attaching a corrected patch
- šŗšøUnited States themodularlab
Yeah I think changing elements would cause more harm than good here. As @frogdog_tech suggests, I'd rather add `type="button"` and `role="button"` to the span element instead of changing the element entirely, assuming that will satisfy the accessibility concerns.