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
|
||||
escapeKeyAction
|
||||
hideActions
|
||||
.heading=${true}
|
||||
.heading=${this.hass?.localize(
|
||||
"ui.panel.page-onboarding.restore.upload_backup"
|
||||
) || "Upload backup"}
|
||||
@closed=${this.closeDialog}
|
||||
>
|
||||
<div slot="heading">
|
||||
|
|
|
@ -71,7 +71,7 @@ class HassioBackupDialog
|
|||
open
|
||||
scrimClickAction
|
||||
@closed=${this.closeDialog}
|
||||
.heading=${true}
|
||||
.heading=${this._backup.name}
|
||||
>
|
||||
<div slot="heading">
|
||||
<ha-header-bar>
|
||||
|
|
|
@ -65,7 +65,9 @@ class HassioHardwareDialog extends LitElement {
|
|||
scrimClickAction
|
||||
hideActions
|
||||
@closed=${this.closeDialog}
|
||||
.heading=${true}
|
||||
.heading=${this._dialogParams.supervisor.localize(
|
||||
"dialog.hardware.title"
|
||||
)}
|
||||
>
|
||||
<div class="header" slot="heading">
|
||||
<h2>
|
||||
|
|
|
@ -94,7 +94,7 @@ export class DialogHassioNetwork
|
|||
open
|
||||
scrimClickAction
|
||||
escapeKeyAction
|
||||
.heading=${true}
|
||||
.heading=${this.supervisor.localize("dialog.network.title")}
|
||||
hideActions
|
||||
@closed=${this.closeDialog}
|
||||
>
|
||||
|
|
|
@ -55,7 +55,11 @@ class DialogMediaPlayerBrowse extends LitElement {
|
|||
escapeKeyAction
|
||||
hideActions
|
||||
flexContent
|
||||
.heading=${true}
|
||||
.heading=${!this._currentItem
|
||||
? this.hass.localize(
|
||||
"ui.components.media-browser.media-player-browser"
|
||||
)
|
||||
: this._currentItem.title}
|
||||
@closed=${this.closeDialog}
|
||||
>
|
||||
<ha-header-bar slot="heading">
|
||||
|
|
|
@ -105,7 +105,7 @@ export class MoreInfoDialog extends LitElement {
|
|||
<ha-dialog
|
||||
open
|
||||
@closed=${this.closeDialog}
|
||||
.heading=${true}
|
||||
.heading=${name}
|
||||
hideActions
|
||||
data-domain=${domain}
|
||||
>
|
||||
|
|
|
@ -139,7 +139,7 @@ export class QuickBar extends LitElement {
|
|||
|
||||
return html`
|
||||
<ha-dialog
|
||||
.heading=${true}
|
||||
.heading=${this.hass.localize("ui.dialogs.quick-bar.title")}
|
||||
open
|
||||
@opened=${this._handleOpened}
|
||||
@closed=${this.closeDialog}
|
||||
|
|
|
@ -74,7 +74,9 @@ export class DialogEntityEditor extends LitElement {
|
|||
return html`
|
||||
<ha-dialog
|
||||
open
|
||||
.heading=${true}
|
||||
.heading=${stateObj
|
||||
? computeStateName(stateObj)
|
||||
: entry?.name || entityId}
|
||||
hideActions
|
||||
@closed=${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
|
||||
!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`
|
||||
<ha-dialog open @closed=${this.closeDialog} hideActions .heading=${true}>
|
||||
<ha-dialog open @closed=${this.closeDialog} hideActions .heading=${title}>
|
||||
<ha-header-bar slot="heading">
|
||||
<ha-icon-button
|
||||
slot="navigationIcon"
|
||||
|
@ -78,17 +88,7 @@ class DialogSystemLogDetail extends LitElement {
|
|||
.label=${this.hass.localize("ui.common.close")}
|
||||
.path=${mdiClose}
|
||||
></ha-icon-button>
|
||||
<span slot="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
|
||||
>`
|
||||
)}
|
||||
</span>
|
||||
<span slot="title"> ${title} </span>
|
||||
<ha-icon-button
|
||||
id="copy"
|
||||
@click=${this._copyLog}
|
||||
|
|
|
@ -65,28 +65,26 @@ export class HuiCreateDialogCard
|
|||
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`
|
||||
<ha-dialog
|
||||
open
|
||||
scrimClickAction
|
||||
@keydown=${this._ignoreKeydown}
|
||||
@closed=${this._cancel}
|
||||
.heading=${true}
|
||||
.heading=${title}
|
||||
class=${classMap({ table: this._currTabIndex === 1 })}
|
||||
>
|
||||
<div slot="heading">
|
||||
<ha-header-bar>
|
||||
<span slot="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"
|
||||
)}
|
||||
</span>
|
||||
<span slot="title"> ${title} </span>
|
||||
</ha-header-bar>
|
||||
<mwc-tab-bar
|
||||
.activeIndex=${this._currTabIndex}
|
||||
|
|
|
@ -176,7 +176,7 @@ export class HuiDialogEditCard
|
|||
@keydown=${this._ignoreKeydown}
|
||||
@closed=${this._cancel}
|
||||
@opened=${this._opened}
|
||||
.heading=${true}
|
||||
.heading=${heading}
|
||||
>
|
||||
<div slot="heading">
|
||||
<ha-header-bar>
|
||||
|
|
|
@ -173,7 +173,7 @@ export class HuiDialogEditView extends LitElement {
|
|||
scrimClickAction
|
||||
escapeKeyAction
|
||||
@closed=${this.closeDialog}
|
||||
.heading=${true}
|
||||
.heading=${this._viewConfigTitle}
|
||||
>
|
||||
<div slot="heading">
|
||||
<h2>${this._viewConfigTitle}</h2>
|
||||
|
|
Loading…
Reference in New Issue