Skip to content

Commit 6a97a83

Browse files
committed
only set title if it has a value
1 parent 791c448 commit 6a97a83

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
@@ -246,7 +246,7 @@ export class UUIButtonElement extends UUIFormControlMixin(
246246
<a
247247
id="button"
248248
aria-label=${ifDefined(this.label)}
249-
title=${this.title}
249+
title=${ifDefined(this.title === '' ? undefined : this.title)}
250250
href=${ifDefined(!this.disabled ? this.href : undefined)}
251251
target=${ifDefined(this.target || undefined)}
252252
rel=${ifDefined(
@@ -265,7 +265,7 @@ export class UUIButtonElement extends UUIFormControlMixin(
265265
type=${this.type}
266266
?disabled=${this.disabled}
267267
aria-label=${ifDefined(this.label)}
268-
title=${this.title}>
268+
title=${ifDefined(this.title === '' ? undefined : this.title)}>
269269
${this.renderState()} ${this.renderLabel()}
270270
<slot name="extra"></slot>
271271
</button>

0 commit comments

Comments
 (0)