User tests: Successful: Unsuccessful:
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
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_categories com_contact com_content com_newsfeeds |
Title |
|
Labels |
Added:
?
|
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?
Title |
|
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
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
There are some JS formvalidator issues when creating a new article via the Modal select fields, but that does not seem to be related to the changes of this PR.
I have tested this item
There are some JS formvalidator issues when creating a new article via the Modal select fields, but that does not seem to be related to the changes of this PR.
I have tested this item
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-05-04 12:06:26 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Thanks guys!
Thanks
This has changed drastically the id of the label, using _name
instead of _id
and therefore breaking some js as associations-edit.js
It took me some hours to find out what was broken and I can solve the js easily with a PR but I wonder if this is B/C.
Could someone explain in simple terms why this specific change ?
For example I get:
<label id="jform_associations_de_DE_name-lbl"
instead of
<label id="jform_associations_de_DE_id-lbl"
If it IS absolutely necessary then we should have some documentation about it.
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