-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[4.0] Labels Ordering are not associated with forms #23888
Comments
Most of the custom elements have the same problem. I did raise this previously |
@zwiastunsw the id on the select element there is wrong @brianteeman what do you mean most custom elements have the same issue? It might be a bug in the id as in the example above but there is no fundamental problem with form fields inside a custom element: |
Check the switcher,fancy-field-select and media custom field and the field used for article selection eg Article Associations (might not be a custom field (?) The label is not associated with the field |
Erm, I'm just showcasing the media custom field above... |
sorry that one is ok - I was using edge as the browser and it presents the a11y tree in a different way and I misread it for that one. the other two are correct reports. PS the real easy giveaeway without checking the accessibiity tree is that you should be able to click on the field label and the browser will highlight the field input |
I have identified the same problem on many pages. In order not to assume new issues, here is a list of detected cases:
|
|
@zwiastunsw can you update the list please as I think some of them have been resolved in the #23919 |
As far as I can tell it is just the switcher fields that need fixing. Can you suggest what the html should be and I can fix that |
As you can see, there were no switches in the list above. Because this is a separate topic.
The easiest way seems to me to add a legend tag inside the fieldset tag. <fieldset class="switcher success active has-success" tabindex="0" id="jform_params_show_on_article_page" aria-checked="true" role="switch" aria-labeledby="jform_params_show_on_article_page-lbl">
<legend class=" ...." >Show on Article Page</legend>
<input type="radio" id="jform_params_show_on_article_page0" name="jform[params][show_on_article_page]" value="0" tabindex="-1" class="valid form-control-success" aria-invalid="false">
<input type="radio" id="jform_params_show_on_article_page1" name="jform[params][show_on_article_page]" value="1" checked="checked" class="active" tabindex="-1">
<span class="switch success"></span>
</fieldset> |
OK I can work on that. I was struggling with finding out how to do the mark up - but the legend seems a good approach with a class of sr-ony I will work on that. |
I thought rather about replacing the current |
@dgrammatiko just realised that this switcher is all js - not my area ;) |
@zwiastunsw @brianteeman decide what the markup should be and I'll do the changes |
I am happy with the legend idea. A fieldset is supposed to have one anyway |
We need someone to style the legend so it looks like label, eg respects the style of the rest of the form. @ciar4n some help here? |
My opinion: |
Replacing the label with a legend wont work. |
@brianteeman the legend will be a child of the fieldset not outside. The styling needs to be adjusted so it looks like a label, so not changing the markup, just some fancy styling |
but you would then need to change the renderfield code to not output a label |
@brianteeman there is already an option in the codebase for this
So we just add hiddenLabel="true" in the xml for the switch, or even better we do that in the field itself |
@dgrammatiko : Note. Remember to correctly add |
|
no to legend, to fieldset |
I've merged that to unblock here |
Not really. That field will have to be done by someone else in another pr. You don't want me writing JavaScript |
Looks like the problem with the fields identified in the original post is that they are all joomla-field-fancy-select |
Other identified fields that exhibit the problem are those with select buttons. Like select a category. I have a fix in preparation for those. |
see #24775 for more of the above being fixed |
@zwiastunsw please update this so that I can know if there are any more to fix |
I'm very busy until June 12th. I'm sory |
@zwiastunsw still busy? |
I'm here. Today I did my first tests. :) |
Closed as having Pull Request #25779 |
Steps to reproduce the issue
or
or
Expected result
Actual result
System information (as much as possible)
Additional comments
The label should probably be assigned to the 'select' field.
The text was updated successfully, but these errors were encountered: