-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
fix(aria-expanded) on submenues add aria prop #79775
Conversation
@georgebatalinski thanks for the PR. Currently we are in Endgame week which means we are doing testing and do not take new features - thus assigning this to September. On the best location where we would tackle the expanded State, @sbatten would be the best since he owns the menus. |
@sbatten would you be able to give me some context around how the menu is structured? this.container I am working on trying to figure out if there is no conflict with these on the a element |
@georgebatalinski If I understand correctly, this should only be set to true when the submenu is open. It looks like this PR adds it when the element is created which means that it will always be true. I'll gladly explain about the structure to help out here. Firstly, the section you are modifying is a class called
vscode/src/vs/base/browser/ui/menu/menu.ts Line 699 in d93c8c4
vscode/src/vs/base/browser/ui/menu/menu.ts Line 687 in d93c8c4
Also notice that you typed aria-expended in the PR but it should be aria-expanded. |
@sbatten this is amazing context - thank you so much. I will update it |
Tests completed:
@isidorn is it correct for an element to have both aria-checked and aria-expended?
|
@georgebatalinski according to my knowledge, From your comment I am assuming that you added the Example for |
@isidorn I will review this tomorrow, thank you for the input on |
I am still working on figuring out which elements have the will update soon (after fixing the build errors on my machine from yarn :) |
@georgebatalinski great thanks |
@isidorn this PR is ready to go - I had sometime today (so started investigating my yarn issue) |
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\15.0\Bin\MSBuild.exe ENOENT |
@georgebatalinski I think you forgot to push your latest changes to this PR, since the last change I see is from 19 days ago. |
@isidorn the PR has been ready since then (19 days ago), I am still having yarn issues - trying to get it to work via |
Looks good to me. Though leaving final review to @sbatten since he owns the menus. |
credit to @jeanp413 for calling out this duplication
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.
noticed there were still 2 places we weren't setting back to false so I updated those
@@ -796,13 +790,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem { | |||
this.submenuDisposables.add(this.parentData.submenu.onDidCancel(() => { | |||
this.parentData.parent.focus(); | |||
|
|||
if (this.parentData.submenu) { |
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.
@jeanp413 credit to you for calling this out in your PR. In this PR it became necessary to fix without further duplicating code.
@georgebatalinski can you please sign the contributer license agreement and we will merge this PR in. |
@georgebatalinski pinging for CLA signing |
@georgebatalinski are you still available to sign the CLA? |
@sbatten yes - I will sign it |
* fix(aria-expended) on submenues add aria prop * (aria-expanded) on sub menu creation ⭐ * add missing places for setting to false credit to @jeanp413 for calling out this duplication
@isidorn I am trying to figure out how to solve this aria-expended issue.
Can you advise me that we would try to add/remove the following?
on
<a class="action-menu-item monaco-submenu-item" aria-expended="true">