File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,15 @@ export class UUIButtonElement extends UUIFormControlMixin(
137
137
@property ( { type : String } )
138
138
public rel ?: string ;
139
139
140
+ /**
141
+ * Sets the title attribute, which provides a tooltip for both button and anchor elements.
142
+ * @type {string }
143
+ * @attr
144
+ * @default ''
145
+ */
146
+ @property ( { type : String } )
147
+ public title : string = '' ;
148
+
140
149
@query ( '#button' )
141
150
protected _button ! : HTMLInputElement ;
142
151
@@ -237,6 +246,7 @@ export class UUIButtonElement extends UUIFormControlMixin(
237
246
<a
238
247
id= "button"
239
248
aria-label = ${ ifDefined ( this . label ) }
249
+ title= ${ ifDefined ( this . title === '' ? undefined : this . title ) }
240
250
href= ${ ifDefined ( ! this . disabled ? this . href : undefined ) }
241
251
target= ${ ifDefined ( this . target || undefined ) }
242
252
rel= ${ ifDefined (
@@ -254,7 +264,8 @@ export class UUIButtonElement extends UUIFormControlMixin(
254
264
id= "button"
255
265
type = ${ this . type }
256
266
?dis abled= ${ this . disabled }
257
- aria- label= ${ ifDefined ( this . label ) } >
267
+ aria- label= ${ ifDefined ( this . label ) }
268
+ title= ${ ifDefined ( this . title === '' ? undefined : this . title ) } >
258
269
${ this . renderState ( ) } ${ this . renderLabel ( ) }
259
270
<slot name= "extra" > </ slot>
260
271
</ butto n>
You can’t perform that action at this time.
0 commit comments