[wp-trac] [WordPress Trac] #16206: Comment text not marked as required

WordPress Trac noreply at wordpress.org
Wed Jan 20 15:48:02 UTC 2016


#16206: Comment text not marked as required
-----------------------------------+--------------------------------
 Reporter:  infected               |       Owner:  rianrietveld
     Type:  defect (bug)           |      Status:  assigned
 Priority:  normal                 |   Milestone:  4.5
Component:  Comments               |     Version:  3.0.4
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  ui, accessibility
-----------------------------------+--------------------------------

Comment (by rianrietveld):

 Updated the patch after discussion with @joedolson and @afercia in Slack:

 Added to the defaults array:
 {{{#!php
 'comment_notes_logged_in_before' => '<p class="comment-notes">'.
 $required_text . '</p>',
 }}}


 Added

 {{{#!php
 echo $args['comment_notes_logged_in_before'];
 }}}

 to the form if is_user_logged_in()

 If a user is logged in the message shows: Required fields are marked *
 If a user is not logged in the message shows: Your email address will not
 be published. Required fields are marked *

 Also changed required="required" into required
 (http://www.w3.org/WAI/GL/wiki/Techniques/HTML5/Using_the_required_attribute_to_indicate_a_required_input_field)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/16206#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list