Skip to content

Commit

Permalink
fix(uui-button): conditionally render aria-label
Browse files Browse the repository at this point in the history
  • Loading branch information
iOvergaard committed Feb 13, 2024
1 parent 1f139dc commit 9f4d928
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/uui-button/lib/uui-button.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class UUIButtonElement extends FormControlMixin(
? html`
<a
id="button"
aria-label=${this.label}
aria-label=${ifDefined(this.label)}
href=${ifDefined(!this.disabled ? this.href : undefined)}
target=${ifDefined(this.target || undefined)}
rel=${ifDefined(
Expand All @@ -224,7 +224,7 @@ export class UUIButtonElement extends FormControlMixin(
<button
id="button"
?disabled=${this.disabled}
aria-label=${this.label}>
aria-label=${ifDefined(this.label)}>
${this.renderState()} ${this.renderLabel()}
<slot name="extra"></slot>
</button>
Expand Down

0 comments on commit 9f4d928

Please sign in to comment.