Skip to content

Commit

Permalink
fix(ui5-icon): correct tabindex value (#4509)
Browse files Browse the repository at this point in the history
nnaydenow authored Jan 5, 2022
1 parent 0a7c1f3 commit 54698f6
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/base/hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
LwpwazozKyw2R4uvmZVLv5VZq7E=
LwpwazozKyw2R4uvmZVLv5VZq7E=
8 changes: 5 additions & 3 deletions packages/main/src/Icon.js
Original file line number Diff line number Diff line change
@@ -219,13 +219,13 @@ class Icon extends UI5Element {
this.createGlobalStyle(); // hide all icons until the first icon has rendered (and added the Icon.css)
}

_onfocusin(event) {
_onFocusInHandler(event) {
if (this.interactive) {
this.focused = true;
}
}

_onfocusout(event) {
_onFocusOutHandler(event) {
this.focused = false;
}

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

get tabIndex() {
return this.interactive ? "0" : "-1";
return this.interactive ? "0" : undefined;
}

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

this._onclick = this.interactive ? this._onClickHandler.bind(this) : undefined;
this._onfocusout = this.interactive ? this._onFocusOutHandler.bind(this) : undefined;
this._onfocusin = this.interactive ? this._onFocusInHandler.bind(this) : undefined;

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

0 comments on commit 54698f6

Please sign in to comment.