Opened 2 years ago
Last modified 23 months ago
#47018 new enhancement
No error message provided upon incomplete input in Tags Administration Screen
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 5.1.1 |
Component: | Taxonomy | Keywords: | has-screenshots input-validation |
Focuses: | ui, accessibility, administration | Cc: |
Description
During a recent accessibility audit at Pressbooks, we were informed there were problems with the taxonomy editor.
If a user leaves the required 'name' input field blank and presses the submit button, the field becomes highlighted in red, but no error message is provided.
WordPress should provide an error message with instructions to help users correct the incomplete submission.
See: https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms/Form_validation#Customized_error_messages
Attachments (2)
Change History (13)
#2
@
2 years ago
- Keywords has-screenshots added
Thanks for the ticket @conner_bw
For reference I add:
- the screenshot for the case of missing name when Javascript is disabled: adding-a-tag-with-missing-name-field-with-javascript-disabled.jpg
- the screenshot for the case of missing name when Javascript is enabled: adding-a-tag-with-missing-name-field-with-javascript-enabled.jpg
Sorry for the duplicated screenshot in adding-a-tag-with-missing-name-field-with-javascript-enabled.2.jpg. (I can't remove it)
Related ticket #42937 for the missing success message.
#3
@
2 years ago
If it helps, this is how we (temporarily, until issue is resolved) fixed it in Pressbooks:
https://github.com/pressbooks/pressbooks/commit/0e9e143f0e96d1589278eb8954264bec7a651574
#4
@
2 years ago
Sorry for the duplicated screenshot
Removed it for you :)
@conner_bw thanks for your report. User input validation is an important topic and required by at least a couple WCAG requirements to meet level AA (error identification, correction suggestions). As it is now, input validation in WordPress is definitely insufficient both server side and client side.
It's certainly possible to try to fix the few cases where validateForm()
is used. Wondering if a more general solution would be worth it. It would require some big refactoring though, especially in the way input fields are generated.
Re: the browsers constraint validation API: WordPress still supports Internet Explorer 11, which unfortunately doesn't support the reportValidity()
method.
Will propose to discuss the general issue during next accessibility team meeting on Slack, on Friday at 15:00 UTC. Everybody's welcome.
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
2 years ago
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
2 years ago
#9
@
2 years ago
- Milestone changed from Awaiting Review to Future Release
Discussed during today's accessibility bug scrub. General consensus was there's no great point in fixing one single instance of insufficient user input validation.
To our knowledge, at the moment WordPress doesn't have a solid user input validation mechanism and maybe it's time to consider to build one. This would be a big project though, that probably needs to be addressed in a broader discussion. Moving to Future Release for now.
And here: https://github.com/WordPress/wordpress-develop/blob/5cc7acd1abc12e5f65f3dc67bfa1d27f683ee2df/src/wp-admin/edit-tag-form.php#L133