Skip to content

Commit 64920f1

Browse files
committed
Add keypress handle
1 parent 0a94b50 commit 64920f1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

alcs-frontend/src/app/shared/tags/tag-chip/tag-chip.component.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
removable: !removable,
55
commissioner: isCommissioner,
66
}"
7-
(click)="handleClick($event)"
8-
tabindex="-1"
9-
role="presentation"
7+
(click)="handleClickOrKeyPress($event)"
8+
(keypress)="handleClickOrKeyPress($event)"
109
>
1110
{{ tag.name }}
1211
<button matChipRemove [attr.aria-label]="'remove ' + tag" *ngIf="removable">

alcs-frontend/src/app/shared/tags/tag-chip/tag-chip.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class TagChipComponent {
1616
this.removeClicked.emit(this.tag);
1717
}
1818

19-
handleClick(event: MouseEvent) {
19+
handleClickOrKeyPress(event: MouseEvent | KeyboardEvent) {
2020
event.preventDefault();
2121
event.stopPropagation();
2222
}

0 commit comments

Comments
 (0)