Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#47018 new enhancement

No error message provided upon incomplete input in Tags Administration Screen

Reported by: conner_bw 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:


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.

Source: https://github.com/WordPress/wordpress-develop/blob/5cc7acd1abc12e5f65f3dc67bfa1d27f683ee2df/src/wp-admin/edit-tags.php#L434

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 @birgire
2 years ago

  • Keywords has-screenshots added

Thanks for the ticket @conner_bw

For reference I add:

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 @conner_bw
2 years ago

If it helps, this is how we (temporarily, until issue is resolved) fixed it in Pressbooks:


#4 @afercia
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.

#5 @SergeyBiryukov
2 years ago

  • Component changed from General to Taxonomy
  • Focuses ui administration added

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.

2 years ago

#7 @afercia
2 years ago

  • Keywords input-validation added

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.

2 years ago

#9 @afercia
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.

This ticket was mentioned in Slack in #accessibility by greatislander. View the logs.

2 years ago

#11 @afercia
2 years ago

Related: #47105.

Note: See TracTickets for help on using tickets.