-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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(menu): improve a11y for screenreaders #1715
Conversation
* real mousedowns will indicate the mouse button that was pressed (e.g. "1" for | ||
* the left mouse button), faked mousedowns will usually set the property value to 0. | ||
*/ | ||
export function isFakeMousedown(event: MouseEvent): boolean { |
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.
I still kind of want to call this isFakeMousedownFromScreenReader
...
@@ -130,10 +129,10 @@ export class MdMenuTrigger implements AfterViewInit, OnDestroy { | |||
private _resetMenu(): void { | |||
this._setIsMenuOpen(false); | |||
|
|||
if (this._openedFromKeyboard) { | |||
if (!this._openedByMouse) { |
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.
Add comment here explaining why we only want to set focus when it's opened via keyboard.
LGTM |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes keyboard navigation for JAWS and NVDA screenreaders. Needs rebase once menu animations PR goes in.
Closes #1673.