Skip to content

Commit a48e94d

Browse files
fix(components/indicators): use attribute binding on the tokens component to avoid duplicate 'role' values (#803)
1 parent 95c7667 commit a48e94d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.18
1+
16.18.1

libs/components/indicators/src/lib/modules/tokens/tokens.component.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33
[@blockAnimationOnLoad]
44
[attr.role]="tokens.length ? 'grid' : null"
55
>
6+
<!--
7+
The role must use square brackets otherwise Angular sets the native 'role'
8+
attribute as well as the input attribute of the token, which fails accessibility rules.
9+
-->
610
<sky-token
711
*ngFor="let token of tokens; let i = index; trackBy: trackTokenFn"
8-
role="row"
912
[@.disabled]="!trackWith"
1013
[@dismiss]
1114
[disabled]="disabled"
1215
[dismissible]="dismissible"
1316
[focusable]="focusable"
17+
[role]="'row'"
1418
(dismiss)="removeToken(token)"
1519
(click)="onTokenClick(token)"
1620
(keydown)="onTokenKeyDown($event)"

0 commit comments

Comments
 (0)