Skip to content

Conversation

@chmst
Copy link
Contributor

@chmst chmst commented Nov 17, 2025

Pull Request for Issue #46446 .
Replaces #46451

Summary of Changes

This PR sepaprates Legend of the fieldset and label of a field in all pages for password reset. (request, confirm, complete)

Testing Instructions

I a frontend login form click the "forgot password" link.

Actual result BEFORE applying this Pull Request

The label of the fieldset is used for a legend. If there is no label, there would not be a legend at all, which is an a11y issue.
A legend is not an instruction but summarises the content of a fieldset.
This PR adds a legend for the fieldset, if there is a label or not.

grafik ### Expected result AFTER applying this Pull Request grafik

Note:
If this is accepted, same change is needed for similiar pages in the users component.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@Sieger66
Copy link
Contributor

@Kostelano
Copy link
Contributor

I have tested this item ✅ successfully on 0510135


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

1 similar comment
@hans2103
Copy link
Contributor

I have tested this item ✅ successfully on 0510135


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

@richard67 richard67 added the RMDQ ReleaseManagerDecisionQueue label Nov 20, 2025
@richard67
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Nov 20, 2025
Copy link
Member

@HLeithner HLeithner left a comment

Choose a reason for hiding this comment

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

Use a "new" legend attribute and keep the text strings in the form xml

@chmst
Copy link
Contributor Author

chmst commented Nov 26, 2025

@HLeithner Seems to be a misunderstanding. A fieldset MUST have a legend whether there is a fieldset label or not.
See my text in "Actual result BEFORE applying this Pull Request"

@HLeithner
Copy link
Member

HLeithner commented Nov 27, 2025

Not in the HTML standard and I'm pretty sure an empty legend field doesn't help anyone.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/fieldset

@chmst
Copy link
Contributor Author

chmst commented Dec 4, 2025

In my PR I wanted to make sure that there is a legend, whether it is in the xml or not.
With your suggestion we have the same situation as before. If there is no legend defined in the xml, there is no legend at all.

Comment on lines +35 to +37
<?php if (isset($fieldset->legend)) : ?>
<legend><?php echo Text::_($fieldset->legend); ?></legend>
<?php endif; ?>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<?php if (isset($fieldset->legend)) : ?>
<legend><?php echo Text::_($fieldset->legend); ?></legend>
<?php endif; ?>
<?php if (isset($fieldset->legend)) : ?>
<legend><?php echo Text::_($fieldset->legend); ?></legend>
<?php elseif (isset($fieldset->label)) : ?>
<legend><?php echo Text::_($fieldset->label); ?></legend>
<?php endif; ?>

Question: Should we do it here and in the other tmpl/reset files like this suggestion so it is fully b/c with old XML files e.g. from overrides?

@HLeithner What do you think?

Of course this will not solve the problem mentioned by @chmst in her comment that a fieldset should always have a legend.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What if there is neither a legend nor a label?
In nearly all layouts of the backend we are using a language key for legends. So I think we can take this as a standard.
example

                    <fieldset id="fieldset-publishingdata" class="options-form">
                        <legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
                        <div>
                        <?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
                        </div>
                    </fieldset>

Copy link
Member

Choose a reason for hiding this comment

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

better move it to the xml, so it's configurable

Copy link
Member

Choose a reason for hiding this comment

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

your suggestion would force to have a legend, else you can't use the label as "label" for something else on another position it would be doubled.

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

Labels

a11y Accessibility bug PR-5.4-dev RMDQ ReleaseManagerDecisionQueue RTC This Pull Request is Ready To Commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants