[ACA-2582] menu menuitem roles (#1315)

* chore: wip

* chore: wip mark will poke around

* chore: removed unused directive

* remove useless directive

* cleanup code

Co-authored-by: Denys Vuika <denys.vuika@gmail.com>
This commit is contained in:
Chris Rodriguez
2020-03-23 10:23:37 -04:00
committed by GitHub
parent 0d0b228cb7
commit 5e49d9591b
2 changed files with 4 additions and 2 deletions

View File

@@ -37,7 +37,7 @@
[overlapTrigger]="false" [overlapTrigger]="false"
yPosition="below" yPosition="below"
> >
<ng-container *ngFor="let action of createActions; trackBy: trackById"> <div role="menu" *ngFor="let action of createActions; trackBy: trackById">
<app-toolbar-menu-item [actionRef]="action"></app-toolbar-menu-item> <app-toolbar-menu-item [actionRef]="action"></app-toolbar-menu-item>
</ng-container> </div>
</mat-menu> </mat-menu>

View File

@@ -2,6 +2,7 @@
<ng-container *ngSwitchCase="'menu'"> <ng-container *ngSwitchCase="'menu'">
<button <button
mat-menu-item mat-menu-item
role="menuitem"
[disabled]="actionRef.disabled" [disabled]="actionRef.disabled"
[matMenuTriggerFor]="childMenu" [matMenuTriggerFor]="childMenu"
> >
@@ -29,6 +30,7 @@
<ng-container *ngSwitchDefault> <ng-container *ngSwitchDefault>
<button <button
[id]="actionRef.id" [id]="actionRef.id"
role="button"
mat-menu-item mat-menu-item
[role]="'button'" [role]="'button'"
color="primary" color="primary"