Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(@clayui/card): LPD-1261 Add name to group all radio type inputs #5828

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

veroglez
Copy link
Member

@veroglez veroglez commented May 31, 2024

Hi guys!,

I am sending this pull because while fixing this bug https://liferay.atlassian.net/browse/LPD-1261, I realized the following:

bugRadioButton.mov

As you see in the video, when you navigate by keyboard, the navigation does not recognize which radio button is selected, and when you return to the cards, the radio input that is not selected is focused.

This happens because to group the radio buttons in a group it is necessary to add the same name to all the inputs https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/radiogroup_role.

For that reason, for the radio buttons to work correctly I have added the name as required in radioProps (apart from value), this being the correct behavior:

fixRadioButton.mov

Let me know what you think, thanks in advance! 😃

Copy link
Member

@matuzalemsteles matuzalemsteles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for working on this @veroglez.

@matuzalemsteles matuzalemsteles merged commit affe1ae into liferay:master Jun 4, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants