Skip to content

Commit

Permalink
Remove unnecessary aria-labelledby from radios (#253)
Browse files Browse the repository at this point in the history
* Remove unnecessary aria-labelledby from radios

* Update changelog
  • Loading branch information
edwardhorsford authored Sep 10, 2024
1 parent 250e35b commit 6d09861
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ exports[`Radios matches snapshot 1`] = `
class="nhsuk-radios__item"
>
<input
aria-labelledby="example-1--label"
class="nhsuk-radios__input"
id="example-1"
name="example"
Expand All @@ -32,7 +31,6 @@ exports[`Radios matches snapshot 1`] = `
class="nhsuk-radios__item"
>
<input
aria-labelledby="example-2--label"
class="nhsuk-radios__input"
id="example-2"
name="example"
Expand Down
1 change: 0 additions & 1 deletion src/components/form-elements/radios/components/Radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const Radio: FC<RadioProps> = ({
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}
Expand Down

0 comments on commit 6d09861

Please sign in to comment.