mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Remove aria-label and blur from list items (#15073)
This commit is contained in:
parent
e6dbb1da7e
commit
fe2b4d9598
@ -144,7 +144,7 @@ export default class HaAutomationAction extends LitElement {
|
|||||||
</mwc-button>
|
</mwc-button>
|
||||||
${this._processedTypes(this.hass.localize).map(
|
${this._processedTypes(this.hass.localize).map(
|
||||||
([opt, label, icon]) => html`
|
([opt, label, icon]) => html`
|
||||||
<mwc-list-item .value=${opt} aria-label=${label} graphic="icon">
|
<mwc-list-item .value=${opt} graphic="icon">
|
||||||
${label}<ha-svg-icon slot="graphic" .path=${icon}></ha-svg-icon
|
${label}<ha-svg-icon slot="graphic" .path=${icon}></ha-svg-icon
|
||||||
></mwc-list-item>
|
></mwc-list-item>
|
||||||
`
|
`
|
||||||
|
@ -38,7 +38,7 @@ export class HaConditionAction extends LitElement implements ActionElement {
|
|||||||
>
|
>
|
||||||
${this._processedTypes(this.hass.localize).map(
|
${this._processedTypes(this.hass.localize).map(
|
||||||
([opt, label, icon]) => html`
|
([opt, label, icon]) => html`
|
||||||
<mwc-list-item .value=${opt} aria-label=${label} graphic="icon">
|
<mwc-list-item .value=${opt} graphic="icon">
|
||||||
${label}<ha-svg-icon slot="graphic" .path=${icon}></ha-svg-icon
|
${label}<ha-svg-icon slot="graphic" .path=${icon}></ha-svg-icon
|
||||||
></mwc-list-item>
|
></mwc-list-item>
|
||||||
`
|
`
|
||||||
|
@ -189,7 +189,7 @@ export default class HaAutomationCondition extends LitElement {
|
|||||||
</mwc-button>
|
</mwc-button>
|
||||||
${this._processedTypes(this.hass.localize).map(
|
${this._processedTypes(this.hass.localize).map(
|
||||||
([opt, label, icon]) => html`
|
([opt, label, icon]) => html`
|
||||||
<mwc-list-item .value=${opt} aria-label=${label} graphic="icon">
|
<mwc-list-item .value=${opt} graphic="icon">
|
||||||
${label}<ha-svg-icon slot="graphic" .path=${icon}></ha-svg-icon
|
${label}<ha-svg-icon slot="graphic" .path=${icon}></ha-svg-icon
|
||||||
></mwc-list-item>
|
></mwc-list-item>
|
||||||
`
|
`
|
||||||
|
@ -137,7 +137,7 @@ export default class HaAutomationTrigger extends LitElement {
|
|||||||
</mwc-button>
|
</mwc-button>
|
||||||
${this._processedTypes(this.hass.localize).map(
|
${this._processedTypes(this.hass.localize).map(
|
||||||
([opt, label, icon]) => html`
|
([opt, label, icon]) => html`
|
||||||
<mwc-list-item .value=${opt} aria-label=${label} graphic="icon">
|
<mwc-list-item .value=${opt} graphic="icon">
|
||||||
${label}<ha-svg-icon slot="graphic" .path=${icon}></ha-svg-icon
|
${label}<ha-svg-icon slot="graphic" .path=${icon}></ha-svg-icon
|
||||||
></mwc-list-item>
|
></mwc-list-item>
|
||||||
`
|
`
|
||||||
|
@ -147,7 +147,6 @@ class HaConfigInfo extends LitElement {
|
|||||||
graphic="avatar"
|
graphic="avatar"
|
||||||
openNewTab
|
openNewTab
|
||||||
href=${documentationUrl(this.hass, page.path)}
|
href=${documentationUrl(this.hass, page.path)}
|
||||||
@click=${this._entryClicked}
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
slot="graphic"
|
slot="graphic"
|
||||||
@ -212,10 +211,6 @@ class HaConfigInfo extends LitElement {
|
|||||||
this._osInfo = osInfo;
|
this._osInfo = osInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _entryClicked(ev) {
|
|
||||||
ev.currentTarget.blur();
|
|
||||||
}
|
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
return [
|
return [
|
||||||
haStyle,
|
haStyle,
|
||||||
|
@ -18,13 +18,7 @@ export class HaIntegrationOverflowMenu extends LitElement {
|
|||||||
.label=${this.hass.localize("ui.common.menu")}
|
.label=${this.hass.localize("ui.common.menu")}
|
||||||
.path=${mdiDotsVertical}
|
.path=${mdiDotsVertical}
|
||||||
></ha-icon-button>
|
></ha-icon-button>
|
||||||
<ha-clickable-list-item
|
<ha-clickable-list-item href="/config/application_credentials">
|
||||||
@click=${this._entryClicked}
|
|
||||||
href="/config/application_credentials"
|
|
||||||
aria-label=${this.hass.localize(
|
|
||||||
"ui.panel.config.application_credentials.caption"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.config.application_credentials.caption"
|
"ui.panel.config.application_credentials.caption"
|
||||||
)}
|
)}
|
||||||
@ -32,10 +26,6 @@ export class HaIntegrationOverflowMenu extends LitElement {
|
|||||||
</ha-button-menu>
|
</ha-button-menu>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _entryClicked(ev) {
|
|
||||||
ev.currentTarget.blur();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@ -277,13 +277,7 @@ export class HaConfigLovelaceDashboards extends LitElement {
|
|||||||
.label=${this.hass.localize("ui.common.menu")}
|
.label=${this.hass.localize("ui.common.menu")}
|
||||||
.path=${mdiDotsVertical}
|
.path=${mdiDotsVertical}
|
||||||
></ha-icon-button>
|
></ha-icon-button>
|
||||||
<ha-clickable-list-item
|
<ha-clickable-list-item href="/config/lovelace/resources">
|
||||||
@click=${this._entryClicked}
|
|
||||||
href="/config/lovelace/resources"
|
|
||||||
aria-label=${this.hass.localize(
|
|
||||||
"ui.panel.config.lovelace.resources.caption"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.config.lovelace.resources.caption"
|
"ui.panel.config.lovelace.resources.caption"
|
||||||
)}
|
)}
|
||||||
@ -391,8 +385,4 @@ export class HaConfigLovelaceDashboards extends LitElement {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private _entryClicked(ev) {
|
|
||||||
ev.currentTarget.blur();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,6 @@ class IntegrationsStartupTime extends LitElement {
|
|||||||
twoline
|
twoline
|
||||||
hasMeta
|
hasMeta
|
||||||
openNewTab
|
openNewTab
|
||||||
@click=${this._entryClicked}
|
|
||||||
href=${docLink}
|
href=${docLink}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
@ -114,10 +113,6 @@ class IntegrationsStartupTime extends LitElement {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private _entryClicked(ev) {
|
|
||||||
ev.currentTarget.blur();
|
|
||||||
}
|
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
return css`
|
return css`
|
||||||
ha-clickable-list-item {
|
ha-clickable-list-item {
|
||||||
|
@ -239,13 +239,7 @@ export class HaSceneEditor extends SubscribeMixin(
|
|||||||
.path=${mdiDotsVertical}
|
.path=${mdiDotsVertical}
|
||||||
></ha-icon-button>
|
></ha-icon-button>
|
||||||
|
|
||||||
<mwc-list-item
|
<mwc-list-item .disabled=${!this.sceneId} graphic="icon">
|
||||||
.disabled=${!this.sceneId}
|
|
||||||
aria-label=${this.hass.localize(
|
|
||||||
"ui.panel.config.scene.picker.duplicate_scene"
|
|
||||||
)}
|
|
||||||
graphic="icon"
|
|
||||||
>
|
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.config.scene.picker.duplicate_scene"
|
"ui.panel.config.scene.picker.duplicate_scene"
|
||||||
)}
|
)}
|
||||||
@ -257,9 +251,6 @@ export class HaSceneEditor extends SubscribeMixin(
|
|||||||
|
|
||||||
<mwc-list-item
|
<mwc-list-item
|
||||||
.disabled=${!this.sceneId}
|
.disabled=${!this.sceneId}
|
||||||
aria-label=${this.hass.localize(
|
|
||||||
"ui.panel.config.scene.picker.delete_scene"
|
|
||||||
)}
|
|
||||||
class=${classMap({ warning: Boolean(this.sceneId) })}
|
class=${classMap({ warning: Boolean(this.sceneId) })}
|
||||||
graphic="icon"
|
graphic="icon"
|
||||||
>
|
>
|
||||||
|
@ -236,13 +236,7 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
|
|||||||
|
|
||||||
<li divider role="separator"></li>
|
<li divider role="separator"></li>
|
||||||
|
|
||||||
<mwc-list-item
|
<mwc-list-item graphic="icon" @click=${this._switchUiMode}>
|
||||||
aria-label=${this.hass.localize(
|
|
||||||
"ui.panel.config.automation.editor.edit_ui"
|
|
||||||
)}
|
|
||||||
graphic="icon"
|
|
||||||
@click=${this._switchUiMode}
|
|
||||||
>
|
|
||||||
${this.hass.localize("ui.panel.config.automation.editor.edit_ui")}
|
${this.hass.localize("ui.panel.config.automation.editor.edit_ui")}
|
||||||
${this._mode === "gui"
|
${this._mode === "gui"
|
||||||
? html`
|
? html`
|
||||||
@ -254,13 +248,7 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
|
|||||||
`
|
`
|
||||||
: ``}
|
: ``}
|
||||||
</mwc-list-item>
|
</mwc-list-item>
|
||||||
<mwc-list-item
|
<mwc-list-item graphic="icon" @click=${this._switchYamlMode}>
|
||||||
aria-label=${this.hass.localize(
|
|
||||||
"ui.panel.config.automation.editor.edit_yaml"
|
|
||||||
)}
|
|
||||||
graphic="icon"
|
|
||||||
@click=${this._switchYamlMode}
|
|
||||||
>
|
|
||||||
${this.hass.localize("ui.panel.config.automation.editor.edit_yaml")}
|
${this.hass.localize("ui.panel.config.automation.editor.edit_yaml")}
|
||||||
${this._mode === "yaml"
|
${this._mode === "yaml"
|
||||||
? html`
|
? html`
|
||||||
@ -277,11 +265,6 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
|
|||||||
|
|
||||||
<mwc-list-item
|
<mwc-list-item
|
||||||
.disabled=${!this._readOnly && !this.scriptId}
|
.disabled=${!this._readOnly && !this.scriptId}
|
||||||
.label=${this.hass.localize(
|
|
||||||
this._readOnly
|
|
||||||
? "ui.panel.config.script.editor.migrate"
|
|
||||||
: "ui.panel.config.script.editor.duplicate"
|
|
||||||
)}
|
|
||||||
graphic="icon"
|
graphic="icon"
|
||||||
@click=${this._duplicate}
|
@click=${this._duplicate}
|
||||||
>
|
>
|
||||||
@ -298,9 +281,6 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
|
|||||||
|
|
||||||
<mwc-list-item
|
<mwc-list-item
|
||||||
.disabled=${this._readOnly || !this.scriptId}
|
.disabled=${this._readOnly || !this.scriptId}
|
||||||
aria-label=${this.hass.localize(
|
|
||||||
"ui.panel.config.script.picker.delete"
|
|
||||||
)}
|
|
||||||
class=${classMap({ warning: Boolean(this.scriptId) })}
|
class=${classMap({ warning: Boolean(this.scriptId) })}
|
||||||
graphic="icon"
|
graphic="icon"
|
||||||
@click=${this._deleteConfirm}
|
@click=${this._deleteConfirm}
|
||||||
|
@ -122,17 +122,12 @@ export class HuiSaveConfig extends LitElement implements HassDialog {
|
|||||||
</div>
|
</div>
|
||||||
${this._params.mode === "storage"
|
${this._params.mode === "storage"
|
||||||
? html`
|
? html`
|
||||||
<mwc-button
|
<mwc-button slot="primaryAction" @click=${this.closeDialog}>
|
||||||
slot="primaryAction"
|
${this.hass!.localize("ui.common.cancel")}
|
||||||
.label=${this.hass!.localize("ui.common.cancel")}
|
</mwc-button>
|
||||||
@click=${this.closeDialog}
|
|
||||||
></mwc-button>
|
|
||||||
<mwc-button
|
<mwc-button
|
||||||
slot="primaryAction"
|
slot="primaryAction"
|
||||||
?disabled=${this._saving}
|
?disabled=${this._saving}
|
||||||
aria-label=${this.hass!.localize(
|
|
||||||
"ui.panel.lovelace.editor.save_config.save"
|
|
||||||
)}
|
|
||||||
@click=${this._saveConfig}
|
@click=${this._saveConfig}
|
||||||
>
|
>
|
||||||
${this._saving
|
${this._saving
|
||||||
@ -148,13 +143,11 @@ export class HuiSaveConfig extends LitElement implements HassDialog {
|
|||||||
</mwc-button>
|
</mwc-button>
|
||||||
`
|
`
|
||||||
: html`
|
: html`
|
||||||
<mwc-button
|
<mwc-button slot="primaryAction" @click=${this.closeDialog}>
|
||||||
slot="primaryAction"
|
${this.hass!.localize(
|
||||||
.label=${this.hass!.localize(
|
|
||||||
"ui.panel.lovelace.editor.save_config.close"
|
"ui.panel.lovelace.editor.save_config.close"
|
||||||
)}
|
)}</mwc-button
|
||||||
@click=${this.closeDialog}
|
>
|
||||||
></mwc-button>
|
|
||||||
`}
|
`}
|
||||||
</ha-dialog>
|
</ha-dialog>
|
||||||
`;
|
`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user