Skip to content

Commit

Permalink
fix: for Radio button / group unexpected behaviour (#4708)
Browse files Browse the repository at this point in the history
* Removes unnecessary  tabindex on form control container

* Update to make the form group focussable
  • Loading branch information
thiessenp-cds authored Nov 27, 2024
1 parent 86eae83 commit afbf9c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/clientComponents/forms/FormGroup/FormGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ export const FormGroup = (props: FormGroupProps): React.ReactElement => {
data-testid="formGroup"
className={classes}
aria-describedby={ariaDescribedBy}
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
tabIndex={0}
// Used to programmatically focus a form group by e.g. a form validation skip ahead link
// -1 is used over 0, so the group is not in the natural tab order which is confusing for AT
tabIndex={-1}
>
{children}
</fieldset>
Expand Down

0 comments on commit afbf9c7

Please sign in to comment.