Skip to content

Commit

Permalink
♿ a11y(bal-nav): button overlays not reachable via keyboard (#1456)
Browse files Browse the repository at this point in the history
* Create PR for #1415

* Create PR for #1415

* fix(close): remove inherited tab index attribute

* fix(close): added changeset

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marinkov, Magdalena <[email protected]>
  • Loading branch information
github-actions[bot] and mmarinkov committed Sep 13, 2024
1 parent d42d3d3 commit 2808954
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-brooms-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@baloise/ds-core': patch
---

**a11y**: fix: implement a11y for close button on modals
7 changes: 0 additions & 7 deletions packages/core/src/components/bal-close/bal-close.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import { i18nBalClose } from './bal-close.i18n'
styleUrl: 'bal-close.sass',
})
export class Close implements ComponentInterface, BalConfigObserver {
private inheritedAttributes: { [k: string]: any } = {}

@Element() el!: HTMLElement

@State() language: BalLanguage = defaultConfig.language
Expand All @@ -27,10 +25,6 @@ export class Close implements ComponentInterface, BalConfigObserver {
*/
@Prop() inverted = false

componentWillRender() {
this.inheritedAttributes = inheritAttributes(this.el, ['tabindex'])
}

/**
* @internal define config for the component
*/
Expand Down Expand Up @@ -60,7 +54,6 @@ export class Close implements ComponentInterface, BalConfigObserver {
...buttonEl.modifier(`size-${this.size}`).class(this.size !== ''),
}}
data-testid="bal-close"
{...this.inheritedAttributes}
>
<bal-icon
name="close"
Expand Down

0 comments on commit 2808954

Please sign in to comment.