From f82b62f45c46e08f37b12151c9622392e531125b Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Fri, 31 Jan 2020 10:19:08 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20tabindex=20for=20default?= =?UTF-8?q?=20entity=20more-info=20actions=20(#4697)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix tabindex for default entity more-info actions * Update hui-state-label-badge.ts --- src/panels/lovelace/badges/hui-state-label-badge.ts | 4 +++- src/panels/lovelace/cards/hui-picture-entity-card.ts | 4 +++- src/panels/lovelace/components/hui-generic-entity-row.ts | 4 +--- .../lovelace/entity-rows/hui-input-select-entity-row.ts | 4 +--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/panels/lovelace/badges/hui-state-label-badge.ts b/src/panels/lovelace/badges/hui-state-label-badge.ts index 5ebea58d8b..25b7f3c8fa 100644 --- a/src/panels/lovelace/badges/hui-state-label-badge.ts +++ b/src/panels/lovelace/badges/hui-state-label-badge.ts @@ -49,7 +49,9 @@ export class HuiStateLabelBadge extends LitElement implements LovelaceBadge { hasDoubleClick: hasAction(this._config!.double_tap_action), })} tabindex=${ifDefined( - hasAction(this._config.tap_action) ? "0" : undefined + hasAction(this._config.tap_action) || this._config.entity + ? "0" + : undefined )} > `; diff --git a/src/panels/lovelace/cards/hui-picture-entity-card.ts b/src/panels/lovelace/cards/hui-picture-entity-card.ts index 8e47402538..187da7ec35 100644 --- a/src/panels/lovelace/cards/hui-picture-entity-card.ts +++ b/src/panels/lovelace/cards/hui-picture-entity-card.ts @@ -158,7 +158,9 @@ class HuiPictureEntityCard extends LitElement implements LovelaceCard { hasDoubleClick: hasAction(this._config!.double_tap_action), })} tabindex=${ifDefined( - hasAction(this._config.tap_action) ? "0" : undefined + hasAction(this._config.tap_action) || this._config.entity + ? "0" + : undefined )} class=${classMap({ clickable: stateObj.state !== UNAVAILABLE, diff --git a/src/panels/lovelace/components/hui-generic-entity-row.ts b/src/panels/lovelace/components/hui-generic-entity-row.ts index e0e61d4639..50fa3cb1ed 100644 --- a/src/panels/lovelace/components/hui-generic-entity-row.ts +++ b/src/panels/lovelace/components/hui-generic-entity-row.ts @@ -74,9 +74,7 @@ class HuiGenericEntityRow extends LitElement { hasHold: hasAction(this.config!.hold_action), hasDoubleClick: hasAction(this.config!.double_tap_action), })} - tabindex=${ifDefined( - hasAction(this.config.tap_action) ? "0" : undefined - )} + tabindex=${ifDefined(pointer ? "0" : undefined)} >