Note: tests have changed significantly because there is no longer a concept of "nothing activated" in the list.
BREAKING CHANGE: removed `active` from list-item, menu-item, and select-option. Instead, List uses tabindex to track whether something is focusable.
PiperOrigin-RevId: 565531998
default focus is now FIRST_ITEM and instead of LIST_ROOT and the menu / list itself has tabindex -1 by default as our a11y model recommends
PiperOrigin-RevId: 565244488
Why? This is needed for selects in forms, which uses the `selected` attribute to indicate default selected values when resetting.
BREAKING CHANGE: `option.selected` no longer reflects. Set the attribute instead if relying on the attribute for styles/queries.
PiperOrigin-RevId: 565212026
This is a change to the repositioning algorithm that attempts to keep the surface in the screen. This largely follows the behavior of Wiz's implementation.
Instead of just repositioning the surface in the window, it will also attempt to flip the anchor and surface anchors and compares whether that will cause less repositioning of the menu. It also adds the option for it to resize the surface rather than just move it so that it doesn't overlap other components like md-select.
PiperOrigin-RevId: 563475751
Fixes#4817
We need to communicate between components when an event has been handled (e.g. keyboard navigation or clicking). This CL focuses on listening to `defaultPrevented` in order to communicate that something was handled. We also have to patch ripple on submenu to make sure that the ripple isn't triggered.
PiperOrigin-RevId: 561748634
lots of hard coded stuff to enable our tests. Cleaning this up for generalized client usage.
BREAKING CHANGE: menu harnesses will not automatically open menus in quick mode anymore and interactions in menu and list harnesses will not automatically go to the first item but rather the menu roots.
PiperOrigin-RevId: 561746073
BREAKING: `MdMenu.prototype.anchor` now only accepts a string which will querySelector the rootNode of the menu. The method now to anchor to an element reference is to set `MdMenu.prototype.anchorElement`. This matches the `popover` anchoring proposal more closely, but that proposal may not pass in favor of a CSS approach.
PiperOrigin-RevId: 560955779
## Why?
Because currently `md-list` and `md-menu` can accept any aria role as a `type` property. However this can result in invalid roles being added, e.g. `progressbar` is allowed as a valid `type`.
Instead this change scopes the `type` to the following:
- `<md-list>` `type` can be any of: `'menu'|'menubar'|'listbox'|'list'|''`.
- `<md-menu>` `type` can be any of: `'menu'|'menubar'|'listbox'|'list'`.
PiperOrigin-RevId: 560180446
fixes#4160
A workaround to lessen the likelihood of someone's styles clashing with the default light dom styles of md-menu and md-select. It's difficult to tell whether a slotted element will animate and fire animation events, so tihs is a bit of a workaround for now.
PiperOrigin-RevId: 558910594
BREAKING CHANGE: list-item-link and menu-item-link have been removed and their functionality has been added to menu-item and list-item respectively.
PiperOrigin-RevId: 553894393
Fixes issues running in ES5
BREAKING CHANGE: subclassing events is not supported in ES5 so all menu-related events now use CustomEvent rather than subclassing Event
PiperOrigin-RevId: 553304128
BREAKING_CHANGE: Renamed property `typeaheadBufferDelay` to `typeaheadDelay`, and attribute `list-tab-index` to `list-tabindex`.
PiperOrigin-RevId: 542685976