Skip to content

Commit 54698f6

Browse files
authored
fix(ui5-icon): correct tabindex value (#4509)
1 parent 0a7c1f3 commit 54698f6

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/base/hash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
LwpwazozKyw2R4uvmZVLv5VZq7E=
1+
LwpwazozKyw2R4uvmZVLv5VZq7E=

packages/main/src/Icon.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,13 @@ class Icon extends UI5Element {
219219
this.createGlobalStyle(); // hide all icons until the first icon has rendered (and added the Icon.css)
220220
}
221221

222-
_onfocusin(event) {
222+
_onFocusInHandler(event) {
223223
if (this.interactive) {
224224
this.focused = true;
225225
}
226226
}
227227

228-
_onfocusout(event) {
228+
_onFocusOutHandler(event) {
229229
this.focused = false;
230230
}
231231

@@ -280,7 +280,7 @@ class Icon extends UI5Element {
280280
}
281281

282282
get tabIndex() {
283-
return this.interactive ? "0" : "-1";
283+
return this.interactive ? "0" : undefined;
284284
}
285285

286286
get isDecorative() {
@@ -348,6 +348,8 @@ class Icon extends UI5Element {
348348
this.packageName = iconData.packageName;
349349

350350
this._onclick = this.interactive ? this._onClickHandler.bind(this) : undefined;
351+
this._onfocusout = this.interactive ? this._onFocusOutHandler.bind(this) : undefined;
352+
this._onfocusin = this.interactive ? this._onFocusInHandler.bind(this) : undefined;
351353

352354
if (this.accessibleName) {
353355
this.effectiveAccessibleName = this.accessibleName;

0 commit comments

Comments
 (0)