Sometimes the desired effect is to have the menu extend to the available height and then start overflowing instead of flipping to the opposite corner. Cases like search bar, autocomplete or any kind of input with suggestions below the textfield content.
BREAKING CHANGE: Sass component tokens, such as `tokens.md-comp-checkbox-values()`, return `var(--md-<component>, <value>)` instead of just the CSS value. Use `$exclude-custom-properties: true` to remove them.
PiperOrigin-RevId: 652550625
BREAKING CHANGE: `querySelector` for `[role]` and `[aria-*]` attributes may no longer work. See `@material/web/migrations/v2/README.md` and `@material/web/migrations/v2/query-selector-aria.ts`.
Browser/SR test results (go/mwc-double-aria-test-results)
- ✅ VoiceOver on Chrome
- ✅ VoiceOver on iOS Safari
- ✅ TalkBack on Chrome
- ✅ ChromeVox on Chrome
- ✅ NVDA on Chrome
- ✅ NVDA on Firefox
- ✅ JAWS on Chrome
- ✅ JAWS on Firefox
(Optional)
- ❓ VoiceOver on Safari
- ❓ VoiceOver on Firefox
PiperOrigin-RevId: 648859827
We are changing the names of these files to reduce similarity with CSS modules and avoid clashing with tooling built around that. If you're importing `*/internal/styles.css.js`, swap to `*/internal/styles.js`.
PiperOrigin-RevId: 611265000
This change removes the leftover md-comp-menu-list-item token set, which doesn't have a corresponding component. If you're using it, the correct token set to use is md-comp-menu-item.
As a side effect of the merge, it also added the missing menu item container-color token.
PiperOrigin-RevId: 601168134
Ensure pressing escape while on a closed submenu anchor, closes the parent menu
Previously we were not letting a user close a menu when they were focused on any item with keepOpen = true. This included submenu anchors.
This change adds an escape (hehe) hatch to ensure that even on items with keepOpen = true, escape closes the menu. This is what most users expect and is what is the standard on menus around the web.
PiperOrigin-RevId: 587874713
Uses popover API for browsers that support it. Falls back to fixed positioning on browsers that do not.
fixes#2023fixes#5120
PiperOrigin-RevId: 580633646
fixes#5036fixes#5015
iOS has some really bad behaviors when it comes to clicking and focus. clicking on the body on a non-clickable item (like anything outside a menu) does not tirgger a click event that bubbles to menu. Also, clicking on a button does not cause it to be focused, thus depriving us of information on focusout's related target. Therefore we have to assume the anchor is the trigger.
PiperOrigin-RevId: 572137765
fixes#4967
also fixes list-root focus ring and focusout
BREAKING CHANGE: the new ListController behavior no longer waits for event.preventDefault asynchronously because it was causing keyboard navigations to scroll the page.
PiperOrigin-RevId: 568300155