Menu: First item highlighted on opening
In Chrome (Mac OSX), the first item in an mdMenu is highlighted (focused?) when the menu is opened, and stays highlighted even if other menu items are hovered over with the mouse. The other menu items highlight properly, but the first item does not unhighlight.
The latest docs on the Angular Material reference show the issue: https://material.angularjs.org/latest/#/demo/material.components.menu
Highlighted on open:

Highlighted when other items are hovered by mouse:

Using the arrow keys to change the focused item moves the highlight to another item, but if another item is hovered over with the mouse then the newly arrow-key-focused item retains its highlight.
+1 Chrome 43.0.2357.125 on Ubuntu
Spec doesn't have a highlight on the icon dropdown. https://www.google.com/design/spec/components/menus.html#menus-usage
From #3707: I'm guessing that is because the list of options is in a separate area of the DOM than the triggering element, so focus has to be sent to it for accessibility. Internally in the component, focus could be sent to an element wrapping the options instead (using tabindex="-1").
@marcysutton In #3707, it is related to md-select, so there is no separate area of the DOM in that case. Example generating the focus behaviour :
<md-select multiple="true" placeholder="Type d'établissement">
<md-option>Ecole d'ingénieur</md-option>
<md-option>Ecole de commerce</md-option>
<md-option>Ecole spécialisée</md-option>
<md-option>Université</md-option>
</md-select>
+1
Yes, but look at the compiled source in the DOM. The options are embedded in a completely different location than the <md-select> tag. Here is a demo: http://codepen.io/marcysutton/pen/yyxREg?editors=101
Menus and selects work in the same way, so both components need similar focus management.
+1
+1
+1
+1
+1
It would be nice, if the current page is highlighted. I am using Menu Bar, I would like to highlight the current page (that belongs to a menu bar) be high lighted when the menu is opened.
I'm also having this issue. I understand there are some accessibility concerns that need careful consideration. Forcing the first item to be highlighted doesn't make sense in the application I am building.
I'm using the angularui:angular-ui-router package.
@prasannapattam I would recommend seeing if using ui-sref and ui-sref-active parameters would work for handling active/inactive menu contexts.
@hynese, I am building menu from database and I believe I cannot use ui-sref & ui-sref-active. I can create a directive or other mechanism to make the current menu item highlighted. I thought this should be part of the menu, hence I am putting a feature request.
why is broken again? (broken = first default selected xD)
Current hacky workaround for first element not to be highlighted is to create dummy menu-item and set ng-hide="true". But last element still stays highlighted. I tried to add dummy menu-item at the end of the list and it didn't help.
+1
+1
There is two separate issues here, one of which is resolved as of 0.11.0.
- The first item is focused when the menu is opened.
- (resolved) In 0.10.1 and earlier, multiple items can be highlighted at once just by hovering with the mouse.
A third issue which has since come up is that un-hovering leaves one element focused.
It would be good if the starting focus and mouseleave behaviours were customizable, which I think is what people here are now asking for, although I can foresee some issues as I suspect md-menu-bar uses this element, and needs certain focus behaviours.
Have same bug as @jlister76
@jlister76 @Kopleman If you are hovering another item, can you still change the selection with the up/down arrow keys? I know that this doesn't solve the bug, but it might indicate whether this is a regression in the presence of ui-sref, or another bug.