Skip to content

Commit 038e341

Browse files
committed
remove aria-checked
1 parent 69ec42a commit 038e341

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/uui-radio/lib/uui-radio.element.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,15 @@ export class UUIRadioElement extends LitElement {
206206
private _onChange() {
207207
if (this.inputElement.checked) {
208208
this.checked = true;
209-
this.setAttribute('aria-checked', 'true');
209+
this.setAttribute('aria-checked', '');
210210
if (!this.disabled) {
211211
this.setAttribute('tabindex', '0');
212212
this.focus();
213213
}
214214
} else {
215215
this.checked = false;
216216
this.setAttribute('tabindex', '-1');
217-
this.setAttribute('aria-checked', 'false');
217+
this.removeAttribute('aria-checked');
218218
}
219219
this.dispatchEvent(new UUIRadioEvent(UUIRadioEvent.CHANGE));
220220
}
@@ -249,7 +249,7 @@ export class UUIRadioElement extends LitElement {
249249
//if (!this.hasAttribute('role')) this.setAttribute('role', 'radio');
250250
if (!this.hasAttribute('tabindex')) this.setAttribute('tabindex', '-1');
251251
if (!this.hasAttribute('aria-checked'))
252-
this.setAttribute('aria-checked', 'false');
252+
this.removeAttribute('aria-checked');
253253
}
254254

255255
render() {

0 commit comments

Comments
 (0)