Skip to content

Commit

Permalink
fix(nav): sets aria label to meta buttons first and otherwise label
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Jan 19, 2025
1 parent 2af2799 commit af6e761
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/lovely-pants-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@baloise/ds-core': patch
---

**nav**: sets aria label to meta buttons first and otherwise label
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class NavMetaButton extends NavLinkItem implements BalProps.BalNavMetaBut
target={this.target}
aria={{
title: this.htmlTitle,
label: this.label,
label: this.ariaLabel || this.label,
}}
>
{this.label}
Expand All @@ -64,7 +64,7 @@ export class NavMetaButton extends NavLinkItem implements BalProps.BalNavMetaBut
square={!this.label || this.label.length < 3}
aria={{
title: this.htmlTitle,
label: this.label,
label: this.ariaLabel || this.label,
}}
inverted={true}
bal-popup={this.popoverId}
Expand Down Expand Up @@ -94,7 +94,7 @@ export class NavMetaButton extends NavLinkItem implements BalProps.BalNavMetaBut
target={this.target}
aria={{
title: this.htmlTitle,
label: this.label,
label: this.ariaLabel || this.label,
}}
>
{this.icon ? '' : this.label}
Expand All @@ -112,7 +112,7 @@ export class NavMetaButton extends NavLinkItem implements BalProps.BalNavMetaBut
inverted={false}
aria={{
title: this.htmlTitle,
label: this.label,
label: this.ariaLabel || this.label,
}}
bal-popup={this.popoverId}
bal-popup-variant="fullscreen"
Expand All @@ -137,7 +137,7 @@ export class NavMetaButton extends NavLinkItem implements BalProps.BalNavMetaBut
square={!this.label || this.label.length < 3}
aria={{
title: this.htmlTitle,
label: this.label,
label: this.ariaLabel || this.label,
}}
href={this.href}
target={this.target}
Expand All @@ -157,7 +157,7 @@ export class NavMetaButton extends NavLinkItem implements BalProps.BalNavMetaBut
inverted={false}
aria={{
title: this.htmlTitle,
label: this.label,
label: this.ariaLabel || this.label,
}}
bal-popup={this.popoverId}
bal-popup-variant="drawer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ <h2 class="title text-xx-large mb-normal">Heading</h2>
icon: 'call',
popupId: 'popup-call',
touchPlacement: 'bottom',
ariaLabel: '24h Kundenservice',
ariaLabel: '24h Kundenservice Aria',
htmlTitle: '24h Kundenservice',
},
{
Expand Down

0 comments on commit af6e761

Please sign in to comment.