From 86e35879f497854cb7976beb5b0173b051ca1a11 Mon Sep 17 00:00:00 2001 From: Lea Date: Tue, 5 Nov 2024 11:02:38 +0100 Subject: [PATCH] =?UTF-8?q?fix(components):=20Removed=20the=20label=20ref?= =?UTF-8?q?=20from=20aria-describedby=20in=20post-=E2=80=A6=20(#3864)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cherry-pick commit onto v7 …… (#3625) …card-control --------- Co-authored-by: Myrta Sakellariou <66249294+myrta2302@users.noreply.github.com> Co-authored-by: Alizé Debray <33580481+alizedebray@users.noreply.github.com> Co-authored-by: Alizé Debray --- .changeset/selfish-ways-know.md | 5 +++++ .../src/components/post-card-control/post-card-control.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/selfish-ways-know.md diff --git a/.changeset/selfish-ways-know.md b/.changeset/selfish-ways-know.md new file mode 100644 index 0000000000..436f077c19 --- /dev/null +++ b/.changeset/selfish-ways-know.md @@ -0,0 +1,5 @@ +--- +'@swisspost/design-system-components': patch +--- + +Fixed the `post-card-control` label read twice by screen readers. diff --git a/packages/components/src/components/post-card-control/post-card-control.tsx b/packages/components/src/components/post-card-control/post-card-control.tsx index 1f42eb8397..be79251ad9 100644 --- a/packages/components/src/components/post-card-control/post-card-control.tsx +++ b/packages/components/src/components/post-card-control/post-card-control.tsx @@ -379,7 +379,7 @@ export class PostCardControl { name={this.name} value={this.value} checked={this.checked} - aria-describedby={`${this.controlId}_label ${this.controlId}_content`} + aria-describedby={`${this.controlId}_content`} aria-disabled={this.disabled} aria-invalid={this.validity === 'false'} onClick={this.controlClickHandler}