WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 6 weeks 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:

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.

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
3 months 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
3 months 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 @afercia
3 months 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
3 months ago

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

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


3 months ago

#7 @afercia
3 months ago

  • Keywords input-validation added

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


2 months ago

#9 @afercia
2 months 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 months ago

#11 @afercia
6 weeks ago

Related: #47105.

Note: See TracTickets for help on using tickets.