diff --git a/.changeset/beige-brooms-refuse.md b/.changeset/beige-brooms-refuse.md new file mode 100644 index 000000000..bea51a943 --- /dev/null +++ b/.changeset/beige-brooms-refuse.md @@ -0,0 +1,5 @@ +--- +'@baloise/ds-core': patch +--- + +**a11y**: fix: implement a11y for close button on modals diff --git a/packages/core/src/components/bal-close/bal-close.tsx b/packages/core/src/components/bal-close/bal-close.tsx index 4f2418288..2c285b6b1 100644 --- a/packages/core/src/components/bal-close/bal-close.tsx +++ b/packages/core/src/components/bal-close/bal-close.tsx @@ -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 @@ -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 */ @@ -60,7 +54,6 @@ export class Close implements ComponentInterface, BalConfigObserver { ...buttonEl.modifier(`size-${this.size}`).class(this.size !== ''), }} data-testid="bal-close" - {...this.inheritedAttributes} >