Skip to content

Commit 9f4d928

Browse files
committed
fix(uui-button): conditionally render aria-label
1 parent 1f139dc commit 9f4d928

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export class UUIButtonElement extends FormControlMixin(
210210
? html`
211211
<a
212212
id="button"
213-
aria-label=${this.label}
213+
aria-label=${ifDefined(this.label)}
214214
href=${ifDefined(!this.disabled ? this.href : undefined)}
215215
target=${ifDefined(this.target || undefined)}
216216
rel=${ifDefined(
@@ -224,7 +224,7 @@ export class UUIButtonElement extends FormControlMixin(
224224
<button
225225
id="button"
226226
?disabled=${this.disabled}
227-
aria-label=${this.label}>
227+
aria-label=${ifDefined(this.label)}>
228228
${this.renderState()} ${this.renderLabel()}
229229
<slot name="extra"></slot>
230230
</button>

0 commit comments

Comments
 (0)