From cb8a6de86b3dbed50c633b6ec5fb8aae5612c205 Mon Sep 17 00:00:00 2001 From: Daniel Leroux Date: Mon, 3 Apr 2023 06:51:56 +0200 Subject: [PATCH] =?UTF-8?q?fix(core/blind):=20use=20string=20value=20f?= =?UTF-8?q?=C3=BCr=20aria?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/components/blind/blind.tsx | 3 ++- packages/core/src/components/utils/a11y.ts | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 packages/core/src/components/utils/a11y.ts diff --git a/packages/core/src/components/blind/blind.tsx b/packages/core/src/components/blind/blind.tsx index d2e83c9fc31..df1e8aa38cd 100644 --- a/packages/core/src/components/blind/blind.tsx +++ b/packages/core/src/components/blind/blind.tsx @@ -18,6 +18,7 @@ import { Watch, } from '@stencil/core'; import anime from 'animejs'; +import { a11yBoolean } from '../utils/a11y'; let sequentialInstanceId = 0; @Component({ @@ -128,7 +129,7 @@ export class Blind { type="button" aria-labelledby={`ix-blind-header-title-${this.id}`} aria-controls={`ix-blind-content-section-${this.id}`} - aria-expanded={!this.collapsed} + aria-expanded={a11yBoolean(!this.collapsed)} onClick={(e) => this.onHeaderClick(e)} > (value ? 'true' : 'false');