From 6d09861db216c855fd665e7d233ea9b28c118127 Mon Sep 17 00:00:00 2001 From: Ed Horsford Date: Tue, 10 Sep 2024 13:08:04 +0100 Subject: [PATCH] Remove unnecessary aria-labelledby from radios (#253) * Remove unnecessary aria-labelledby from radios * Update changelog --- CHANGELOG.md | 4 ++++ .../radios/__tests__/__snapshots__/Radios.test.tsx.snap | 2 -- src/components/form-elements/radios/components/Radio.tsx | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ff4c98e..c8a3fef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +:wrench: **Fixes** +* Remove the unnecessary aria-labelledby tags from radio items. PR [#253](https://github.com/NHSDigital/nhsuk-react-components/pull/253) + + ## 4.1.2 - 3 September 2024 :wrench: **Fixes** diff --git a/src/components/form-elements/radios/__tests__/__snapshots__/Radios.test.tsx.snap b/src/components/form-elements/radios/__tests__/__snapshots__/Radios.test.tsx.snap index bc9f40aa..3df7d5d6 100644 --- a/src/components/form-elements/radios/__tests__/__snapshots__/Radios.test.tsx.snap +++ b/src/components/form-elements/radios/__tests__/__snapshots__/Radios.test.tsx.snap @@ -13,7 +13,6 @@ exports[`Radios matches snapshot 1`] = ` class="nhsuk-radios__item" > = ({ className={classNames('nhsuk-radios__input', className)} id={inputID} name={name} - aria-labelledby={children ? `${inputID}--label` : undefined} aria-describedby={hint ? `${inputID}--hint` : undefined} checked={checked} defaultChecked={defaultChecked}