Fix all instances where HTML ARIA-ROLE should actually just be role (#10888)

This commit is contained in:
Christopher Toth 2021-12-13 01:35:46 -07:00 committed by GitHub
parent 91bb2ddcc4
commit 5ec37a35f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -46,6 +46,7 @@ class HaAlert extends LitElement {
rtl: this.rtl, rtl: this.rtl,
[this.alertType]: true, [this.alertType]: true,
})}" })}"
role="alert"
> >
<div class="icon ${this.title ? "" : "no-title"}"> <div class="icon ${this.title ? "" : "no-title"}">
<slot name="icon"> <slot name="icon">

View File

@ -393,7 +393,7 @@ class HaSidebar extends LitElement {
) { ) {
return html` return html`
<a <a
aria-role="option" role="option"
href=${`/${urlPath}`} href=${`/${urlPath}`}
data-panel=${urlPath} data-panel=${urlPath}
tabindex="-1" tabindex="-1"
@ -498,7 +498,7 @@ class HaSidebar extends LitElement {
> >
<paper-icon-item <paper-icon-item
class="notifications" class="notifications"
aria-role="option" role="option"
@click=${this._handleShowNotificationDrawer} @click=${this._handleShowNotificationDrawer}
> >
<ha-svg-icon slot="item-icon" .path=${mdiBell}></ha-svg-icon> <ha-svg-icon slot="item-icon" .path=${mdiBell}></ha-svg-icon>
@ -529,7 +529,7 @@ class HaSidebar extends LitElement {
href="/profile" href="/profile"
data-panel="panel" data-panel="panel"
tabindex="-1" tabindex="-1"
aria-role="option" role="option"
aria-label=${this.hass.localize("panel.profile")} aria-label=${this.hass.localize("panel.profile")}
@mouseenter=${this._itemMouseEnter} @mouseenter=${this._itemMouseEnter}
@mouseleave=${this._itemMouseLeave} @mouseleave=${this._itemMouseLeave}

View File

@ -31,7 +31,7 @@ class HaConfigNavigation extends LitElement {
: canShowPage(this.hass, page) : canShowPage(this.hass, page)
) )
? html` ? html`
<a href=${page.path} aria-role="option" tabindex="-1"> <a href=${page.path} role="option" tabindex="-1">
<paper-icon-item @click=${this._entryClicked}> <paper-icon-item @click=${this._entryClicked}>
<div <div
class=${page.iconColor ? "icon-background" : ""} class=${page.iconColor ? "icon-background" : ""}

View File

@ -95,7 +95,7 @@ class OZWConfigDashboard extends LitElement {
<ha-card> <ha-card>
<a <a
href="/config/ozw/network/${instance.ozw_instance}" href="/config/ozw/network/${instance.ozw_instance}"
aria-role="option" role="option"
tabindex="-1" tabindex="-1"
> >
<paper-icon-item> <paper-icon-item>