Fix dialog heading aria label (#11524)
Co-authored-by: Zack Barett <arnett.zackary@gmail.com>
This commit is contained in:
parent
0c6f647f53
commit
0540bae707
|
@ -47,7 +47,9 @@ export class DialogHassioBackupUpload
|
||||||
scrimClickAction
|
scrimClickAction
|
||||||
escapeKeyAction
|
escapeKeyAction
|
||||||
hideActions
|
hideActions
|
||||||
.heading=${true}
|
.heading=${this.hass?.localize(
|
||||||
|
"ui.panel.page-onboarding.restore.upload_backup"
|
||||||
|
) || "Upload backup"}
|
||||||
@closed=${this.closeDialog}
|
@closed=${this.closeDialog}
|
||||||
>
|
>
|
||||||
<div slot="heading">
|
<div slot="heading">
|
||||||
|
|
|
@ -71,7 +71,7 @@ class HassioBackupDialog
|
||||||
open
|
open
|
||||||
scrimClickAction
|
scrimClickAction
|
||||||
@closed=${this.closeDialog}
|
@closed=${this.closeDialog}
|
||||||
.heading=${true}
|
.heading=${this._backup.name}
|
||||||
>
|
>
|
||||||
<div slot="heading">
|
<div slot="heading">
|
||||||
<ha-header-bar>
|
<ha-header-bar>
|
||||||
|
|
|
@ -65,7 +65,9 @@ class HassioHardwareDialog extends LitElement {
|
||||||
scrimClickAction
|
scrimClickAction
|
||||||
hideActions
|
hideActions
|
||||||
@closed=${this.closeDialog}
|
@closed=${this.closeDialog}
|
||||||
.heading=${true}
|
.heading=${this._dialogParams.supervisor.localize(
|
||||||
|
"dialog.hardware.title"
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<div class="header" slot="heading">
|
<div class="header" slot="heading">
|
||||||
<h2>
|
<h2>
|
||||||
|
|
|
@ -94,7 +94,7 @@ export class DialogHassioNetwork
|
||||||
open
|
open
|
||||||
scrimClickAction
|
scrimClickAction
|
||||||
escapeKeyAction
|
escapeKeyAction
|
||||||
.heading=${true}
|
.heading=${this.supervisor.localize("dialog.network.title")}
|
||||||
hideActions
|
hideActions
|
||||||
@closed=${this.closeDialog}
|
@closed=${this.closeDialog}
|
||||||
>
|
>
|
||||||
|
|
|
@ -55,7 +55,11 @@ class DialogMediaPlayerBrowse extends LitElement {
|
||||||
escapeKeyAction
|
escapeKeyAction
|
||||||
hideActions
|
hideActions
|
||||||
flexContent
|
flexContent
|
||||||
.heading=${true}
|
.heading=${!this._currentItem
|
||||||
|
? this.hass.localize(
|
||||||
|
"ui.components.media-browser.media-player-browser"
|
||||||
|
)
|
||||||
|
: this._currentItem.title}
|
||||||
@closed=${this.closeDialog}
|
@closed=${this.closeDialog}
|
||||||
>
|
>
|
||||||
<ha-header-bar slot="heading">
|
<ha-header-bar slot="heading">
|
||||||
|
|
|
@ -105,7 +105,7 @@ export class MoreInfoDialog extends LitElement {
|
||||||
<ha-dialog
|
<ha-dialog
|
||||||
open
|
open
|
||||||
@closed=${this.closeDialog}
|
@closed=${this.closeDialog}
|
||||||
.heading=${true}
|
.heading=${name}
|
||||||
hideActions
|
hideActions
|
||||||
data-domain=${domain}
|
data-domain=${domain}
|
||||||
>
|
>
|
||||||
|
|
|
@ -139,7 +139,7 @@ export class QuickBar extends LitElement {
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<ha-dialog
|
<ha-dialog
|
||||||
.heading=${true}
|
.heading=${this.hass.localize("ui.dialogs.quick-bar.title")}
|
||||||
open
|
open
|
||||||
@opened=${this._handleOpened}
|
@opened=${this._handleOpened}
|
||||||
@closed=${this.closeDialog}
|
@closed=${this.closeDialog}
|
||||||
|
|
|
@ -74,7 +74,9 @@ export class DialogEntityEditor extends LitElement {
|
||||||
return html`
|
return html`
|
||||||
<ha-dialog
|
<ha-dialog
|
||||||
open
|
open
|
||||||
.heading=${true}
|
.heading=${stateObj
|
||||||
|
? computeStateName(stateObj)
|
||||||
|
: entry?.name || entityId}
|
||||||
hideActions
|
hideActions
|
||||||
@closed=${this.closeDialog}
|
@closed=${this.closeDialog}
|
||||||
@close-dialog=${this.closeDialog}
|
@close-dialog=${this.closeDialog}
|
||||||
|
|
|
@ -69,8 +69,18 @@ class DialogSystemLogDetail extends LitElement {
|
||||||
// Custom components with our official docs should not link to our docs
|
// Custom components with our official docs should not link to our docs
|
||||||
!this._manifest.documentation.includes("://www.home-assistant.io"));
|
!this._manifest.documentation.includes("://www.home-assistant.io"));
|
||||||
|
|
||||||
|
const title = this.hass.localize(
|
||||||
|
"ui.panel.config.logs.details",
|
||||||
|
"level",
|
||||||
|
html`<span class=${item.level.toLowerCase()}
|
||||||
|
>${this.hass.localize(
|
||||||
|
"ui.panel.config.logs.level." + item.level.toLowerCase()
|
||||||
|
)}</span
|
||||||
|
>`
|
||||||
|
);
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<ha-dialog open @closed=${this.closeDialog} hideActions .heading=${true}>
|
<ha-dialog open @closed=${this.closeDialog} hideActions .heading=${title}>
|
||||||
<ha-header-bar slot="heading">
|
<ha-header-bar slot="heading">
|
||||||
<ha-icon-button
|
<ha-icon-button
|
||||||
slot="navigationIcon"
|
slot="navigationIcon"
|
||||||
|
@ -78,17 +88,7 @@ class DialogSystemLogDetail extends LitElement {
|
||||||
.label=${this.hass.localize("ui.common.close")}
|
.label=${this.hass.localize("ui.common.close")}
|
||||||
.path=${mdiClose}
|
.path=${mdiClose}
|
||||||
></ha-icon-button>
|
></ha-icon-button>
|
||||||
<span slot="title">
|
<span slot="title"> ${title} </span>
|
||||||
${this.hass.localize(
|
|
||||||
"ui.panel.config.logs.details",
|
|
||||||
"level",
|
|
||||||
html`<span class=${item.level.toLowerCase()}
|
|
||||||
>${this.hass.localize(
|
|
||||||
"ui.panel.config.logs.level." + item.level.toLowerCase()
|
|
||||||
)}</span
|
|
||||||
>`
|
|
||||||
)}
|
|
||||||
</span>
|
|
||||||
<ha-icon-button
|
<ha-icon-button
|
||||||
id="copy"
|
id="copy"
|
||||||
@click=${this._copyLog}
|
@click=${this._copyLog}
|
||||||
|
|
|
@ -65,28 +65,26 @@ export class HuiCreateDialogCard
|
||||||
return html``;
|
return html``;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const title = this._viewConfig.title
|
||||||
|
? this.hass!.localize(
|
||||||
|
"ui.panel.lovelace.editor.edit_card.pick_card_view_title",
|
||||||
|
"name",
|
||||||
|
`"${this._viewConfig.title}"`
|
||||||
|
)
|
||||||
|
: this.hass!.localize("ui.panel.lovelace.editor.edit_card.pick_card");
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<ha-dialog
|
<ha-dialog
|
||||||
open
|
open
|
||||||
scrimClickAction
|
scrimClickAction
|
||||||
@keydown=${this._ignoreKeydown}
|
@keydown=${this._ignoreKeydown}
|
||||||
@closed=${this._cancel}
|
@closed=${this._cancel}
|
||||||
.heading=${true}
|
.heading=${title}
|
||||||
class=${classMap({ table: this._currTabIndex === 1 })}
|
class=${classMap({ table: this._currTabIndex === 1 })}
|
||||||
>
|
>
|
||||||
<div slot="heading">
|
<div slot="heading">
|
||||||
<ha-header-bar>
|
<ha-header-bar>
|
||||||
<span slot="title">
|
<span slot="title"> ${title} </span>
|
||||||
${this._viewConfig.title
|
|
||||||
? this.hass!.localize(
|
|
||||||
"ui.panel.lovelace.editor.edit_card.pick_card_view_title",
|
|
||||||
"name",
|
|
||||||
`"${this._viewConfig.title}"`
|
|
||||||
)
|
|
||||||
: this.hass!.localize(
|
|
||||||
"ui.panel.lovelace.editor.edit_card.pick_card"
|
|
||||||
)}
|
|
||||||
</span>
|
|
||||||
</ha-header-bar>
|
</ha-header-bar>
|
||||||
<mwc-tab-bar
|
<mwc-tab-bar
|
||||||
.activeIndex=${this._currTabIndex}
|
.activeIndex=${this._currTabIndex}
|
||||||
|
|
|
@ -176,7 +176,7 @@ export class HuiDialogEditCard
|
||||||
@keydown=${this._ignoreKeydown}
|
@keydown=${this._ignoreKeydown}
|
||||||
@closed=${this._cancel}
|
@closed=${this._cancel}
|
||||||
@opened=${this._opened}
|
@opened=${this._opened}
|
||||||
.heading=${true}
|
.heading=${heading}
|
||||||
>
|
>
|
||||||
<div slot="heading">
|
<div slot="heading">
|
||||||
<ha-header-bar>
|
<ha-header-bar>
|
||||||
|
|
|
@ -173,7 +173,7 @@ export class HuiDialogEditView extends LitElement {
|
||||||
scrimClickAction
|
scrimClickAction
|
||||||
escapeKeyAction
|
escapeKeyAction
|
||||||
@closed=${this.closeDialog}
|
@closed=${this.closeDialog}
|
||||||
.heading=${true}
|
.heading=${this._viewConfigTitle}
|
||||||
>
|
>
|
||||||
<div slot="heading">
|
<div slot="heading">
|
||||||
<h2>${this._viewConfigTitle}</h2>
|
<h2>${this._viewConfigTitle}</h2>
|
||||||
|
|
Loading…
Reference in New Issue