Skip to content

Commit fad8d24

Browse files
crisbetommalerba
authored andcommitted
docs(menu): fix inaccurate descriptions (#18055)
Fixes the inaccurate description of the menu item which was saying that it's a directive (even though it's a component) and that it's only there to provide the `role`. Also updates the description for the menu trigger. Fixes #18013.
1 parent a909f81 commit fad8d24

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

src/material-experimental/mdc-menu/menu-item.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import {Component, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/co
1111
import {MatMenuItem as BaseMatMenuItem} from '@angular/material/menu';
1212

1313
/**
14-
* This directive is intended to be used inside an mat-menu tag.
15-
* It exists mostly to set the role attribute.
14+
* Single item inside of a `mat-menu`. Provides the menu item styling and accessibility treatment.
1615
*/
1716
@Component({
1817
selector: '[mat-menu-item]',

src/material/menu/menu-item.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ const _MatMenuItemMixinBase: CanDisableRippleCtor & CanDisableCtor & typeof MatM
3636
mixinDisableRipple(mixinDisabled(MatMenuItemBase));
3737

3838
/**
39-
* This directive is intended to be used inside an mat-menu tag.
40-
* It exists mostly to set the role attribute.
39+
* Single item inside of a `mat-menu`. Provides the menu item styling and accessibility treatment.
4140
*/
4241
@Component({
4342
selector: '[mat-menu-item]',

src/material/menu/menu-trigger.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ const passiveEventListenerOptions = normalizePassiveListenerOptions({passive: tr
6666

6767
// TODO(andrewseguin): Remove the kebab versions in favor of camelCased attribute selectors
6868

69-
/**
70-
* This directive is intended to be used in conjunction with an mat-menu tag. It is
71-
* responsible for toggling the display of the provided menu instance.
72-
*/
69+
/** Directive applied to an element that should trigger a `mat-menu`. */
7370
@Directive({
7471
selector: `[mat-menu-trigger-for], [matMenuTriggerFor]`,
7572
host: {

0 commit comments

Comments
 (0)