[wp-trac] [WordPress Trac] #47505: Create a comprehensive form validation API for WordPress editor and administration interface

WordPress Trac noreply at wordpress.org
Fri Jun 7 14:24:04 UTC 2019


#47505: Create a comprehensive form validation API for WordPress editor and
administration interface
-----------------------------------------------+---------------------------
 Reporter:  greatislander                      |      Owner:  (none)
     Type:  defect (bug)                       |     Status:  new
 Priority:  normal                             |  Milestone:  Awaiting
                                               |  Review
Component:  Administration                     |    Version:  trunk
 Severity:  normal                             |   Keywords:
  Focuses:  ui, accessibility, administration  |
-----------------------------------------------+---------------------------
 Currently, WordPress lacks a comprehensive API for validating form input
 and alerting users to errors or missing fields. One example of how this
 can cause problems was captured by @conner_bw in #47018 -- failing to fill
 in the required ‘Name’ field when creating a new taxonomy term highlights
 the field in red but provides no textual message indicating that a
 required field is missing. As noted by @afercia:

 >  there are at least two WCAG success criteria (1 is level A, the other
 one is level AA) that requires a clear identification of the item in error
 and clear suggestions for correction.

 ([https://wordpress.slack.com/archives/C02RP4X03/p1556291609088300 See
 Slack discussion])

 The lack of input validation mechanisms has also been noted as a
 shortcoming in Gutenberg
 ([https://twitter.com/thespacedmonkey/status/1136570949048909824 see
 tweet] from @spacedmonkey about this).

 In the [https://wordpress.slack.com/archives/C02RP4X03/p1556291406082600
 Slack discussion] of #47018, the Accessibility team agreed that the
 broader goal of researching and planning a comprehensive form validation
 API would be a valuable project that would benefit all users. This ticket
 should serve as a starting point for that exploration process. One example
 of how this could work shared during the discussion was something along
 the lines of Tenon’s React-based form validation library: [https://www
 .tenon-ui.info/forms-full-demo]

 Two use cases that this API should cover:

 - Required input is missing
 - Required input is not the expected type

 To be continued!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47505>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list