Skip to content
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

Merged
merged 1 commit into from
Nov 8, 2016
Merged

Conversation

kara
Copy link
Contributor

@kara kara commented Nov 3, 2016

Fixes keyboard navigation for JAWS and NVDA screenreaders. Needs rebase once menu animations PR goes in.

Closes #1673.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Nov 3, 2016
* 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 {
Copy link
Member

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) {
Copy link
Member

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.

@jelbourn
Copy link
Member

jelbourn commented Nov 8, 2016

LGTM

@kara kara added the action: merge The PR is ready for merge by the caretaker label Nov 8, 2016
@jelbourn jelbourn merged commit 267e323 into angular:master Nov 8, 2016
rolandjitsu pushed a commit to rolandjitsu/material2 that referenced this pull request Nov 10, 2016
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Screenreader testing for menu
3 participants