Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

mdMenu: mdButton that becomes an <a> tag will not take focus on hover #7220

Closed
snaumets opened this issue Feb 20, 2016 · 2 comments
Closed
Labels
g3: reported The issue was reported by an internal or external product team. P3: important Important issues that really should be fixed when possible.

Comments

@snaumets
Copy link
Contributor

It seems like normally, hovering over an mdButton item in the menu will also give focus to that element, but when the mdButton becomes an <a> tag, it no longer takes that focus, and the <button> above it in the menu keeps focus, which seems like incorrect/unintentional behavior.
A live example can be seen here. In it, when you hover over any of the 'somethingX' items, it also takes the focus, but when you hover over the 'google' item which is actually a link, it will not steal the focus.

In a mdMenu that consists of mdButtons, each mdButton becomes either a <button> or an <a> tag (when given either an href or ng-href for example). However, the <a> tags dont take the focus when the element is hovered on. It seems that only non-disabled buttons can take the focus.

snaumets added a commit to snaumets/material that referenced this issue Feb 20, 2016
Allow any mdButton element (`<button>` or `<a>` tag) to take focus when it is hovered over.
Previously, only a non-disabled button could be a focusable target when being hovered over.
Now, any non-disabled element with the md-button class can be a focusable target and take focus.

This fix closes issue angular#7220.
@jelbourn jelbourn added g3: reported The issue was reported by an internal or external product team. P3: important Important issues that really should be fixed when possible. labels Feb 25, 2016
@jelbourn
Copy link
Member

cc @rschmukler

ThomasBurleson pushed a commit that referenced this issue Feb 26, 2016
Allow any mdButton element (`<button>` or `<a>` tag) to take focus when it is hovered over.
Previously, only a non-disabled button could be a focusable target when being hovered over.
Now, any non-disabled element with the md-button class can be a focusable target and take focus.

This fix closes issue #7220.

  Closes #7221
ThomasBurleson pushed a commit that referenced this issue Feb 26, 2016
Allow any mdButton element (`<button>` or `<a>` tag) to take focus when it is hovered over.
Previously, only a non-disabled button could be a focusable target when being hovered over.
Now, any non-disabled element with the md-button class can be a focusable target and take focus.

This fix closes issue #7220.

Closes #7221
@topherfangio
Copy link
Contributor

Closed in 0627d9e.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
g3: reported The issue was reported by an internal or external product team. P3: important Important issues that really should be fixed when possible.
Projects
None yet
Development

No branches or pull requests

3 participants