Skip to content

feat(material/menu): add disabledInteractive input to MatMenuItem - #33693

Open
jermowery wants to merge 1 commit into
angular:mainfrom
jermowery:feat/mat-menu-item-disabled-interactive
Open

feat(material/menu): add disabledInteractive input to MatMenuItem#33693
jermowery wants to merge 1 commit into
angular:mainfrom
jermowery:feat/mat-menu-item-disabled-interactive

Conversation

@jermowery

Copy link
Copy Markdown
Contributor

This adds the disabledInteractive input to MatMenuItem, bringing its behavior in line with MatButton. When disabledInteractive is true, the menu item takes on the visual styling of a disabled item and prevents default action on click, but allows for focus, hover states, and pointer events. This is useful for conveying why an item is disabled via a tooltip.

Fixes #33692

@pullapprove
pullapprove Bot requested review from andrewseguin and crisbeto August 17, 2026 21:06
@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: material/menu labels Aug 17, 2026
@jermowery

Copy link
Copy Markdown
Contributor Author

This was made with Jetski, internally at Google. I reviewed the code and it looks pretty similar to what I would have implemented myself

Comment thread src/material/menu/testing/menu-harness.ts Outdated
Comment thread src/material/menu/menu-item.ts Outdated
@crisbeto

Copy link
Copy Markdown
Member

Also worth noting that it seems like the menu keyboard navigation skips over disabled items right now.

@jermowery

Copy link
Copy Markdown
Contributor Author

Also worth noting that it seems like the menu keyboard navigation skips over disabled items right now.

I wonder if the menu needs a bigger overhaul for a11y...

@jermowery
jermowery force-pushed the feat/mat-menu-item-disabled-interactive branch from 4ef5c22 to de6578a Compare August 18, 2026 14:45
This adds the `disabledInteractive` input to `MatMenuItem`, bringing its behavior in line with `MatButton`. When `disabledInteractive` is true, the menu item takes on the visual styling of a disabled item and prevents default action on click, but allows for focus, hover states, and pointer events. This is useful for conveying why an item is disabled via a tooltip.

Fixes angular#33692
@jermowery
jermowery force-pushed the feat/mat-menu-item-disabled-interactive branch from de6578a to 38d8ca5 Compare August 18, 2026 15:19
@jermowery

Copy link
Copy Markdown
Contributor Author

cr/966590721 is the internal test of this, the TAP Train process is in progress

@jermowery

Copy link
Copy Markdown
Contributor Author

TGP results are very positive

https://fusion2.corp.google.com/presubmit/966590721/OCL:966590721:BASE:966561071:1787081556636:79d5cede/targets

Only two failing targets

Both targets appear to be cases where aria-disabled is being set on the mat-menu-item but the menu item is being kept interactive, which I think could be solved by just using the very feature I am adding in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: material/menu detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(menu): MatMenuItem should have disabledInteractive input like MatButton

2 participants