Skip to content

Commit

Permalink
docs(menu): fix inaccurate descriptions (#18055)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
crisbeto authored and mmalerba committed Jan 10, 2020
1 parent a909f81 commit fad8d24
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/material-experimental/mdc-menu/menu-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import {Component, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/co
import {MatMenuItem as BaseMatMenuItem} from '@angular/material/menu';

/**
* This directive is intended to be used inside an mat-menu tag.
* It exists mostly to set the role attribute.
* Single item inside of a `mat-menu`. Provides the menu item styling and accessibility treatment.
*/
@Component({
selector: '[mat-menu-item]',
Expand Down
3 changes: 1 addition & 2 deletions src/material/menu/menu-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ const _MatMenuItemMixinBase: CanDisableRippleCtor & CanDisableCtor & typeof MatM
mixinDisableRipple(mixinDisabled(MatMenuItemBase));

/**
* This directive is intended to be used inside an mat-menu tag.
* It exists mostly to set the role attribute.
* Single item inside of a `mat-menu`. Provides the menu item styling and accessibility treatment.
*/
@Component({
selector: '[mat-menu-item]',
Expand Down
5 changes: 1 addition & 4 deletions src/material/menu/menu-trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ const passiveEventListenerOptions = normalizePassiveListenerOptions({passive: tr

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

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

0 comments on commit fad8d24

Please sign in to comment.