-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5.4] Passwort reset request: fix legend #46454
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
base: 5.4-dev
Are you sure you want to change the base?
Conversation
|
Same can you do at: |
|
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
|
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. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46454. |
HLeithner
left a comment
There was a problem hiding this 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
|
@HLeithner Seems to be a misunderstanding. A fieldset MUST have a legend whether there is a fieldset label or not. |
|
Not in the HTML standard and I'm pretty sure an empty legend field doesn't help anyone. |
|
In my PR I wanted to make sure that there is a legend, whether it is in the xml or not. |
| <?php if (isset($fieldset->legend)) : ?> | ||
| <legend><?php echo Text::_($fieldset->legend); ?></legend> | ||
| <?php endif; ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <?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.
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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.
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