Skip to content

Commit 0c46b62

Browse files
committed
chore: minor a11y fix
1 parent c9cb58d commit 0c46b62

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

2nd-gen/packages/core/components/progress-circle/ProgressCircle.base.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,16 +210,16 @@ export abstract class ProgressCircleBase extends SizedMixin(SpectrumElement, {
210210
super.updated(changes);
211211

212212
if (changes.has('progress')) {
213-
if (this.progress === null) {
214-
this.removeAttribute('aria-valuemin');
215-
this.removeAttribute('aria-valuemax');
216-
this.removeAttribute('aria-valuenow');
217-
this.removeAttribute('aria-valuetext');
218-
} else {
213+
if (this.progress !== null && this.progress >= 0) {
219214
this.setAttribute('aria-valuemin', '0');
220215
this.setAttribute('aria-valuemax', '100');
221216
this.setAttribute('aria-valuenow', String(this.progress));
222217
this.setAttribute('aria-valuetext', this.formatProgress());
218+
} else {
219+
this.removeAttribute('aria-valuemin');
220+
this.removeAttribute('aria-valuemax');
221+
this.removeAttribute('aria-valuenow');
222+
this.removeAttribute('aria-valuetext');
223223
}
224224
}
225225

2nd-gen/packages/swc/components/progress-circle/ProgressCircle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class ProgressCircle extends ProgressCircleBase {
107107
typeof this.staticColor !== 'undefined',
108108
})}
109109
>
110-
<svg fill="none" width="100%" height="100%">
110+
<svg aria-hidden="true" fill="none" width="100%" height="100%">
111111
<circle
112112
cx="50%"
113113
cy="50%"

0 commit comments

Comments
 (0)