Skip to content

Commit 6d09861

Browse files
Remove unnecessary aria-labelledby from radios (#253)
* Remove unnecessary aria-labelledby from radios * Update changelog
1 parent 250e35b commit 6d09861

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
:wrench: **Fixes**
6+
* Remove the unnecessary aria-labelledby tags from radio items. PR [#253](https://github.com/NHSDigital/nhsuk-react-components/pull/253)
7+
8+
59
## 4.1.2 - 3 September 2024
610

711
:wrench: **Fixes**

src/components/form-elements/radios/__tests__/__snapshots__/Radios.test.tsx.snap

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ exports[`Radios matches snapshot 1`] = `
1313
class="nhsuk-radios__item"
1414
>
1515
<input
16-
aria-labelledby="example-1--label"
1716
class="nhsuk-radios__input"
1817
id="example-1"
1918
name="example"
@@ -32,7 +31,6 @@ exports[`Radios matches snapshot 1`] = `
3231
class="nhsuk-radios__item"
3332
>
3433
<input
35-
aria-labelledby="example-2--label"
3634
class="nhsuk-radios__input"
3735
id="example-2"
3836
name="example"

src/components/form-elements/radios/components/Radio.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ const Radio: FC<RadioProps> = ({
5959
className={classNames('nhsuk-radios__input', className)}
6060
id={inputID}
6161
name={name}
62-
aria-labelledby={children ? `${inputID}--label` : undefined}
6362
aria-describedby={hint ? `${inputID}--hint` : undefined}
6463
checked={checked}
6564
defaultChecked={defaultChecked}

0 commit comments

Comments
 (0)