NPM Resource Changed PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
9 Oct 2026

Pull Request resolves #43248 .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Radio fields and checkbox fields are fieldsets and currently render both a and a within their

. The label targets the fieldset itself, which is not a labelable form control and is therefore both redundant and semantically incorrect.

This crazy simple approach compared to #48591 works much much better. Instead of a <label> it now formats it as a <span>

This means that the visual display doesnt change and the invalid markup is replaced

Testing Instructions

Either create radio and checkbox custom fields or check any existing fields of this type within Joomla

Inspect the code for the radio and checkbox

there is an scss and js change so use a pre-built package or npm i

Actual result BEFORE applying this Pull Request

Note the label and the for= - this is invalid markup

image

Expected result AFTER applying this Pull Request

The label has been replaced with a span and the for= is removed

image

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar brianteeman brianteeman - open - 9 Oct 2026
avatar brianteeman brianteeman - change - 9 Oct 2026
Status New ⇒ Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Oct 2026
Category ⇒ Layout
avatar brianteeman brianteeman - change - 9 Oct 2026
The description was changed
avatar brianteeman brianteeman - edited - 9 Oct 2026
avatar brianteeman brianteeman - edited - 9 Oct 2026
avatar brianteeman
brianteeman - comment - 9 Oct 2026

@tecpromotion it would be great if you could test again this version - much much simpler code with no css changes

avatar tecpromotion tecpromotion - test_item - 9 Oct 2026 - Tested unsuccessfully
avatar tecpromotion
tecpromotion - comment - 9 Oct 2026

I have tested this item πŸ”΄ unsuccessfully on 501d2f7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48599.

avatar tecpromotion
tecpromotion - comment - 9 Oct 2026

I have tested this item πŸ”΄ unsuccessfully on 501d2f7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48599.

avatar tecpromotion
tecpromotion - comment - 9 Oct 2026

I have tested this item πŸ”΄ unsuccessfully on 501d2f7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48599.

Needs changes β€” radio fields get the <span>, but checkboxes are not covered, required radio fields lose their inline validation message, and the label text changes colour.

Test fields: custom fields "Test Radio" (radio, required) and "Test Checkboxes" (checkboxes, required) on articles.

Verification

Check Before With PR
Radio field markup <label id="…-lbl" for="fieldset-id"> βœ… <span id="…-lbl">, required * kept
Articles β†’ Options 55 <label for> pointing at a fieldset βœ… 0, 55 spans
Checkboxes field markup <label id="…-lbl" for="fieldset-id"> ❌ unchanged (Finding 1)
Save article with both required fields empty both labels red + "One of the options must be selected" ❌ radio: no message, label not red (Finding 2)
Label text colour (Atum) rgb(0, 27, 76) ❌ radio: rgb(73, 80, 87) (Finding 3)
Subform with a radio field, add 2 rows (Plugins β†’ FileSystem - Local) no duplicate ids ❌ duplicate id (Finding 4)

Finding 1 β€” checkboxes are not changed

Title, description and testing instructions say radio and checkboxes. The check is $field instanceof RadioField; CheckboxesField extends ListField, so its label is still <label for="fieldset-id">. Same for RadiobasicField (also extends ListField, also renders a fieldset; from the code, not tested).

The description also says the id is removed. The id is still there; only for is removed.

Finding 2 β€” required radio fields lose the inline validation message

validate.js finds the label with label[for="<fieldset id>"], adds the class invalid and appends the message to it (markInvalid, markValid, removeMarking). Without for nothing is found: the radio field only gets the generic alert at the top, while the checkboxes field next to it still shows "One of the options must be selected" in red.

Finding 3 β€” the display does change

Atum colours label elements, the span inherits the .control-label colour instead: radio labels are now grey (rgb(73, 80, 87)) next to dark blue labels of all other fields (rgb(0, 27, 76)). In the article sidebar "Featured" becomes rgb(33, 37, 41). Position and font size are unchanged.

Finding 4 β€” duplicate ids in subforms

joomla-field-subform renumbers the group label of a radio fieldset with row.querySelector('label[for="<old id>"]'). The span is not found, so every added row keeps the template id. After adding two rows in Plugins β†’ FileSystem - Local the id jform_params__directories__directoriesX__thumbs-lbl exists twice.

Suggested fix

Findings 2 and 4 need the two scripts to find the element by id (#<fieldset id>-lbl) instead of label[for]; Finding 3 needs the label colour rule (and label.invalid) to apply to the span, e.g. via a class on it.

Screenshots

"Before" = same test site with renderlabel.php from 6.2-dev. Test fields: custom fields "Test Radio" and "Test Checkboxes" (both required) on articles. All at 1440px, Atum.

Finding 2 β€” required radio field loses the inline validation message

Article saved with both required fields empty. Before: both labels turn red and show "One of the options must be selected". After: only the checkboxes field does, "Test Radio" stays unmarked.

Before After
before-article-validation after-article-validation

Finding 3 β€” label colour changes (article, Fields tab)

Before: "Test Radio" has the same dark blue as every other label. After: it is grey (rgb(73, 80, 87) instead of rgb(0, 27, 76)), "Test Checkboxes" below it is unchanged.

Before After
before-article-fields after-article-fields

Finding 3 β€” label colour changes (Articles β†’ Options)

Same effect on the options page: the labels of the switches ("Title", "Linked Titles", "Intro Text" …) are grey, the labels of the select fields ("Choose a Layout", "Position of Article Info") stay dark blue. Position and font size are unchanged.

Before After
before-options after-options
avatar brianteeman brianteeman - change - 9 Oct 2026
The description was changed
avatar brianteeman brianteeman - edited - 9 Oct 2026
avatar brianteeman
brianteeman - comment - 9 Oct 2026

Thanks @tecpromotion i didnt think to check the colour or the highlighting on error. I will look into that

The checkboxes was my fault - I forgot to commit the last change (I have done now)

I have also corrected my description about the id being removed - it was of course the for= that is removed

avatar brianteeman brianteeman - change - 9 Oct 2026
Labels Added: PR-6.2-dev
avatar joomla-cms-bot joomla-cms-bot - change - 9 Oct 2026
Category Layout ⇒ Layout NPM Change
avatar brianteeman brianteeman - change - 9 Oct 2026
The description was changed
avatar brianteeman brianteeman - edited - 9 Oct 2026
avatar brianteeman brianteeman - change - 9 Oct 2026
Labels Added: NPM Resource Changed
avatar joomla-cms-bot joomla-cms-bot - change - 9 Oct 2026
Category Layout NPM Change ⇒ Layout JavaScript NPM Change Front End Templates (site)
avatar github-actions[bot]
github-actions[bot] - comment - 9 Oct 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

avatar brianteeman brianteeman - change - 9 Oct 2026
Labels Added: Conflicting Files
avatar brianteeman brianteeman - change - 9 Oct 2026
Status Pending ⇒ Closed
Closed_Date 0000-00-00 00:00:00 ⇒ 2026-10-09 17:19:16
Closed_By ⇒ brianteeman
avatar brianteeman brianteeman - close - 9 Oct 2026
avatar brianteeman brianteeman - change - 9 Oct 2026
Status Closed ⇒ New
Closed_Date 2026-10-09 17:19:16 ⇒
Closed_By brianteeman ⇒
avatar brianteeman brianteeman - change - 9 Oct 2026
Status New ⇒ Pending
avatar brianteeman brianteeman - reopen - 9 Oct 2026
avatar joomla-cms-bot joomla-cms-bot - change - 9 Oct 2026
Category Layout NPM Change JavaScript Front End Templates (site) ⇒ Layout JavaScript NPM Change
avatar brianteeman
brianteeman - comment - 9 Oct 2026

jiust need to look at the subforms now from @tecpromotion report as everything else should be fixed

avatar brianteeman brianteeman - change - 9 Oct 2026
Labels Removed: Conflicting Files
avatar brianteeman brianteeman - change - 9 Oct 2026
The description was changed
avatar brianteeman brianteeman - edited - 9 Oct 2026
avatar brianteeman
brianteeman - comment - 9 Oct 2026

@tecpromotion i believe all the issues you raised have now been resolved

avatar tecpromotion
tecpromotion - comment - 10 Oct 2026

@tecpromotion i believe all the issues you raised have now been resolved

@brianteeman all four findings from my first test are resolved. One cosmetic leftover: the required * no longer turns red with an invalid label (one-line fix below).

Re-test

Finding from the first test 501d2f7 327340c
1 β€” checkboxes not changed ❌ βœ… <span id="…-lbl"> for radio and checkboxes, no for, * kept
2 β€” no inline validation message ❌ βœ… red label + "One of the options must be selected" for both; removed again after selecting an option and saving
3 β€” label colour grey instead of dark blue ❌ βœ… rgb(0, 27, 76), white in dark mode β€” same as <label>
4 β€” duplicate id after adding subform rows ❌ βœ… none; added rows get …directories2__thumbs-lbl, …directories3__thumbs-lbl

Also checked:

  • Articles β†’ Options: 0 <label for> pointing at a fieldset, 55 spans.
  • Frontend article form (Cassiopeia): validation message and red marking work for both fields; label colours are the same as before the PR.
  • eslint and stylelint on the changed files: clean.

Leftover β€” * stays dark blue in an invalid label (Atum)

.control-label span:not(.invalid):not(.valid):not(.form-control-feedback) also matches the nested span.star. Save a new article with an empty Title:

Before With PR
"Title" red red
* red rgb(197, 40, 39) rgb(0, 27, 76) (dark mode: white instead of rgb(224, 97, 92))
"Please fill in this field" red red

Same for the * of the radio and checkboxes spans. Matching only the direct child fixes it (tested, light and dark: label, * and message are all red, normal state unchanged):

> span:not(.invalid):not(.valid) {
  color: var(--login-label-color);
}
649e2dd 10 Oct 2026 avatar brianteeman css
avatar brianteeman
brianteeman - comment - 10 Oct 2026

css changes made

image
avatar tecpromotion
tecpromotion - comment - 11 Oct 2026

css changes made

image

@brianteeman your screenshot shows the red * β€” nice. I think the commit for it may not be pushed yet: the PR head is still 327340c from 9 October, and there the * is still rgb(0, 27, 76). Happy to re-test as soon as it's up.

avatar brianteeman
brianteeman - comment - 11 Oct 2026

@tecpromotion refreshed but i think you were wrong as github showed that the css change was committed after the head you refer to

image
avatar tecpromotion tecpromotion - test_item - 11 Oct 2026 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 11 Oct 2026

I have tested this item βœ… successfully on 7354c4e

@brianteeman thanks. 649e2dd is dated 10 October, but it reached the PR with today's push at 13:47 UTC (327340c β†’ 7354c4e); GitHub sorts the commits by commit date, so it looks older than it is here.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48599.

avatar tecpromotion
tecpromotion - comment - 11 Oct 2026

I have tested this item βœ… successfully on 7354c4e

@brianteeman thanks. 649e2dd is dated 10 October, but it reached the PR with today's push at 13:47 UTC (327340c β†’ 7354c4e); GitHub sorts the commits by commit date, so it looks older than it is here.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48599.

Add a Comment

Login with GitHub to post a comment