From 2808954081f78eea467c9649e6ca7321e4248c45 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 09:14:54 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BF=20a11y(bal-nav):=20button=20overlays?= =?UTF-8?q?=20not=20reachable=20via=20keyboard=20(#1456)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- .changeset/beige-brooms-refuse.md | 5 +++++ packages/core/src/components/bal-close/bal-close.tsx | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 .changeset/beige-brooms-refuse.md 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} >