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

ID not passed to ValidationMessage in RadioButtonGroup #7191

Open
1 task done
clheppell opened this issue Feb 4, 2025 · 1 comment · May be fixed by #7195
Open
1 task done

ID not passed to ValidationMessage in RadioButtonGroup #7191

clheppell opened this issue Feb 4, 2025 · 1 comment · May be fixed by #7195

Comments

@clheppell
Copy link

clheppell commented Feb 4, 2025

Description

On Sage 200 our automation testers are interested in being able to find validation messages by id so that they can check the content.

For most components like Textbox, I can see the id/name of the textbox ends up getting passed down to the validation as {id/name}-validation and our testers can use this to check an input shows the right validation text.

I can see for most inputs an id is being passed to your internal component but this isn't the case for the .

Reproduction

Sage/carbon/src/components/radio-button/radio-button-group/radio-button-group.component.tsx

Steps to reproduce

No response

JIRA ticket numbers (Sage only)

No response

Suggested solution

Pass an id in the same way as components like Textbox do.

Carbon version

132.2.1

Design tokens version

4.17.0

Relevant browsers

Firefox, Chrome, Safari, Microsoft Edge

Relevant OSs

MacOS, Windows, Linux, Android, iOS

Additional context

For some additional context, our automation find fields by label. Once we find a label, we can use the for attribute to find things like the underlying input, and we'd like to be able to do the same thing for checking things like validation messages.

Confidentiality

  • I confirm there is no confidential or commercially sensitive information included.
@clheppell clheppell added Bug triage Triage Required labels Feb 4, 2025
@nuria1110 nuria1110 added On Backlog and removed triage Triage Required labels Feb 4, 2025
@nuria1110
Copy link
Contributor

FE-7070

nuria1110 added a commit that referenced this issue Feb 7, 2025
Added id prop allows consumers to set a custom id on the group component, otherwise it will be set
to a randomly generated GUID. `id` prop is needed to set hint text and validation ids for
accessibility and testing purposes.

fix #7191
@nuria1110 nuria1110 linked a pull request Feb 7, 2025 that will close this issue
14 tasks
nuria1110 added a commit that referenced this issue Feb 10, 2025
Added id prop allows consumers to set a custom id on the group component, otherwise it will be set
to a randomly generated GUID. `id` prop is needed to set hint text and validation ids for
accessibility and testing purposes.

fix #7191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants