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

WordPress Trac noreply at wordpress.org
Wed Oct 6 15:13:54 UTC 2021


#16206: Comment text not marked as required
-------------------------------------------------+-------------------------
 Reporter:  infected                             |       Owner:
                                                 |  sabernhardt
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.9
Component:  Comments                             |     Version:  3.0.4
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-screenshots required-  |     Focuses:  ui,
  fields needs-testing                           |  accessibility
-------------------------------------------------+-------------------------

Comment (by sabernhardt):

 I polished the patch a little:

 - Changing variable names (for one, `$required_indicator` includes more
 than the asterisk glyph itself)
 - Defining HTML5 attributes together, both checked and required, and then
 verifying within the `sprintf` function whether the `required` attribute
 belongs on that form field
 - Paying more attention to spaces, using the `trim` function to avoid two
 spaces in the required note

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


More information about the wp-trac mailing list