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