Skip to content

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

Merged
andrewseguin merged 1 commit into
angular:mainfrom
jermowery:feat/mat-menu-item-disabled-interactive
Aug 20, 2026
Merged

feat(material/menu): add disabledInteractive input to MatMenuItem#33693
andrewseguin merged 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

@jermowery

Copy link
Copy Markdown
Contributor Author

Fixed all of the tests, running TGP again

@jermowery

Copy link
Copy Markdown
Contributor Author

@jermowery

Copy link
Copy Markdown
Contributor Author

Spoke a little too soon, now it passes http://test/OCL:966590721:BASE:967377509:1787171260610:8b1de062

@crisbeto crisbeto added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker labels Aug 20, 2026
@andrewseguin andrewseguin added target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Aug 20, 2026
@andrewseguin
andrewseguin merged commit cacab55 into angular:main Aug 20, 2026
35 of 38 checks passed
@andrewseguin

Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

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

Labels

action: merge The PR is ready for merge by the caretaker area: material/menu detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants