[ACS-4254] Delete permissions button is now keyboard interact-able (enter key) (#8216)

This commit is contained in:
swapnil-verma-gl
2023-02-10 02:43:40 +05:30
committed by GitHub
parent cae2d70637
commit 5d2dddee28
2 changed files with 2 additions and 1 deletions

View File

@@ -61,6 +61,7 @@
<button mat-icon-button <button mat-icon-button
[disabled]="entry.row.obj.readonly" [disabled]="entry.row.obj.readonly"
(click)="removePermission($event, entry.row.obj)" (click)="removePermission($event, entry.row.obj)"
(keydown.enter)="removePermission($event, entry.row.obj)"
[attr.data-automation-id]="'adf-delete-permission-button-' + entry.row.obj.authorityId" [attr.data-automation-id]="'adf-delete-permission-button-' + entry.row.obj.authorityId"
[attr.aria-label]="'PERMISSION_MANAGER.ACTION.DELETE' | translate"> [attr.aria-label]="'PERMISSION_MANAGER.ACTION.DELETE' | translate">
<mat-icon>delete_outline</mat-icon> <mat-icon>delete_outline</mat-icon>

View File

@@ -75,7 +75,7 @@ export class PermissionContainerComponent implements OnChanges {
this.updateAll.emit(role); this.updateAll.emit(role);
} }
removePermission(event: MouseEvent, permissionRow: PermissionDisplayModel) { removePermission(event: Event, permissionRow: PermissionDisplayModel) {
event.stopPropagation(); event.stopPropagation();
this.delete.emit(permissionRow); this.delete.emit(permissionRow);
} }