fix(web-components): isolate radio option label targets - #4614
fix(web-components): isolate radio option label targets#4614sylvesterkaczmarek wants to merge 1 commit into
Conversation
|
Hi, thanks for this contribution. Please could you run prettier to pass the CI build? Also please could you squash your commits into one, there should be one commit per scope e.g. web-components 😊 Thank you |
0795646 to
e3b71bd
Compare
|
@GCHQ-Developer-530 Thanks. I've applied the Prettier formatting fix and squashed the PR to a single web-components commit as requested. The new Actions runs are currently waiting for approval. |
|
Thanks for contributing. We generally do not split test files per test, and keep tests grouped together per component. |
e3b71bd to
1b185ad
Compare
|
Thanks for the guidance. I've moved the regression coverage into the existing ic-radio-group test file and kept the PR to a single web-components commit. The new Actions runs are currently waiting for maintainer approval. |
923f9cd to
a8b47fb
Compare
|
Please rebase this branch |
61a75b7 to
d561430
Compare
Summary of the changes
Fix repeated radio groups with identical labels so each option label targets the radio input in its own group.
Radio option IDs previously used the option label/value plus the radio-group label. When multiple groups shared the same label, equivalent options produced duplicate DOM IDs, so clicking a label in a later group could activate the first group's input.
The fix keeps existing IDs unchanged for ordinary single-group cases, but includes the required radio-group
namewhen the same group label appears more than once on the page.A focused regression test renders two groups with identical labels and verifies that all radio input IDs are unique and every label points to its own input.
Closes #4165