In the new rows, the labels of each radio button have the appropriate for value to associate with the radio input so screenreaders can "see" it properly, and one can click the label to select a radio.
The label has a for value that is incorrect—it does not match the generated name of the radio input.
For example:
<input class="form-check-input" type="radio" id="jform_com_fields__my_subform__row10__field1322" name="jform[com_fields][my-subform][row10][field132]" value="value">
and
<label for="jform_com_fields__my_subform__rowX__field1322" class="form-check-label">Text</label>
Note the difference between row10 and rowX.
This problem is resolved on saving the item with the additional rows.
Joomla 4.1.2
PHP 8.0
This is an accessibility and usability issue. Seems to be JS related but the code behind subforms is dark magic to me so I am not sure where to look to start debugging.
| Labels |
Added:
No Code Attached Yet
|
||
| Labels |
Added:
a11y
|
||
| Labels |
Added:
bug
|
||
I could not reproduce this on current
5.4-dev/6.1-dev/7.0-dev.Repro attempted: created a
radiocustom field with two options, embedded it in asubformcustom field (multiple="true"), and added 11 rows via the "+" button on an article (so the subform group names wentrow0…row10, matching this issue's exactrow10example). Inspected every generated radioidagainst its<label for>across all 11 rows — all matched, includingrow10:This appears to already be fixed by #43660 ("[5.1] Fix radio and checkboxes in nested subform field", merged for #40160), which rewrote
joomla-field-subform.w-c.es6.js's row-cloning logic to properly rewirelabel[for](and the fieldset/legendfor/idfor grouped radio/checkbox inputs) on every new row. That landed in Joomla 5.1 and is present in all current branches.Since this issue predates that fix and reports the same symptom, it looks like a stale duplicate of #40160 that never got closed when the fix shipped. Suggest closing unless someone can still reproduce it on a current version.