-
-
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] Modal select fields #24775
[4.0] Modal select fields #24775
Conversation
administrator/components/com_categories/Field/Modal/CategoryField.php
Outdated
Show resolved
Hide resolved
…eld.php oops Co-Authored-By: brianteeman <brian@teeman.net>
This is more complicated. There’s a technical difference too. Disabled means the field isn’t submitting. So the readonly attribute means it is submitting which is undesired. We only want the hidden field to be submitting the data |
Disabled also means the field should be skipped in the tab order which is why the screen reader never sees it. It might be submitted but what is it submitting? It can only be submitting exactly the same as the hidden field. As both fields have different id then surely we are already only storing the submitted values of the hidden field??? Have to ask though why we have a hidden field in the first place? |
Hidden field holds the value/ID that is sent to the server. Text field just displays the name of selected item to the user. @wilsonge True, but that shouldn't be an issue if input has no |
I can't find any docs on that either way. The HTML5 spec says that name is optional but doesn't tell browsers how to handle it when that is missing. I think practically speaking it's true it won't be submitted when it's missing but it's definitely not a given either. As for why it's hidden it's as @SharkyKZ says. The value being submitted isn't the name of the article it's the id. The disabled field is sending the title of the newsfeed/article etc |
As discussed with @wilsonge: securitywise I have no concerns with the PR |
Good to continue then @brianteeman |
After that small diversion its all good to go then. Just needs tests. Nothing else from me |
I have tested this item ✅ successfully on df3755c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24775. |
I have tested this item ✅ successfully on df3755c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24775. |
Thanks guys! |
Thanks |
This has changed drastically the id of the label, using Could someone explain in simple terms why this specific change ? If it IS absolutely necessary then we should have some documentation about it. |
See #25060 |
The following fields were identified by @zwiastunsw as not having labels associated with the element
There were TWO different problems that this PR fixes
When applied to a form field, the disabled attribute means that the field does not receive focus. resulting in the screen reader ignoring the field and not announcing the value of the field
Basically the fields that look like
Menus: Edit Item page, Single Article menu item type
Details tab: Select Article field
Menus: Edit Item page, Category blog menu item type
Details tab: Choose a Category field
Menus: Edit Item page, Single Contact menu item type
Details tab: Select Contact field
Menus: Edit Item page, Contact Single Category menu item type
Details tab: Select a Category field
Menus: Edit Item page, Single News Feed menu item type
Details tab: Feed field