Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/panels/lovelace/badges/hui-state-label-badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { actionHandler } from "../common/directives/action-handler-directive";
import { hasAction } from "../common/has-action";
import { ActionHandlerEvent } from "../../../data/lovelace";
import { handleAction } from "../common/handle-action";
import { computeDomain } from "../../../common/entity/compute_domain";

@customElement("hui-state-label-badge")
export class HuiStateLabelBadge extends LitElement implements LovelaceBadge {
Expand Down Expand Up @@ -49,7 +50,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
)}
></ha-state-label-badge>
`;
Expand Down
4 changes: 3 additions & 1 deletion src/panels/lovelace/cards/hui-picture-entity-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 1 addition & 3 deletions src/panels/lovelace/components/hui-generic-entity-row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
></state-badge>
<div class="flex">
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ class HuiInputSelectEntityRow extends LitElement implements LovelaceRow {
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)}
></state-badge>
<ha-paper-dropdown-menu
.label=${this._config.name || computeStateName(stateObj)}
Expand Down