[wp-trac] [WordPress Trac] #4332: Unusable comment error pages

WordPress Trac noreply at wordpress.org
Sun Aug 11 19:55:53 UTC 2013


#4332: Unusable comment error pages
-------------------------+-----------------------------
 Reporter:  foolswisdom  |       Owner:  markjaquith
     Type:  enhancement  |      Status:  accepted
 Priority:  normal       |   Milestone:  Future Release
Component:  Comments     |     Version:  1.5
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+-----------------------------
Changes (by westonruter):

 * cc: weston@… (added)
 * keywords:  needs-patch => has-patch


Comment:

 I know there has been previous discussion about the use of HTML5 form
 validation attributes (#22183, #15080), and in r23689 the `formnovalidate`
 attribute was added to explicitly disable client-side browser validation
 due to poor/incomplete client-side validation rules in their
 implementations, but #22183 notes that the offending browsers are Chrome
 17 and Firefox 10, which is a century ago in Internet years, as we're now
 at Chrome 28 and Firefox 23. What specifically were the problems with the
 browsers' client-side email validation? Are they still valid?

 All of this to say, we can quickly avoid the problem of no error page
 redirect and also improve the user experience by relying on client-side
 HTML5 form validation, and adding `required` attributes alongside the
 existing `aria-required='true'` attributes. (I don't believe `required`
 attribute need be conditioned on `current_theme_supports( 'html5',
 'comment-form' )` since the `aria-required` attribute is unconditional.)
 The `required` attribute can be unconditionally present on the comment
 `textarea` but conditionally on the name and email fields based on the
 `require_name_email` option, just like the `aria-required` attribute.

 Patch attached, and branch also pushed to GitHub fork:
 https://github.com/x-team/WordPress/compare/4332-client-side-comment-form-
 validation

--
Ticket URL: <http://core.trac.wordpress.org/ticket/4332#comment:24>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list