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

WordPress Trac noreply at wordpress.org
Tue Oct 26 18:58:14 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-dev-note                          |  accessibility
-------------------------------------------------+-------------------------
Changes (by sabernhardt):

 * keywords:  has-patch has-screenshots required-fields needs-dev-note
     needs-refresh => has-patch has-screenshots required-fields needs-dev-
     note


Comment:

 [attachment:"16206.9.patch"] adds the required fields message that was
 missing for logged-in users with ''most'' themes in 16206.8.patch.

 At least [https://wpdirectory.net/search/01FJM4V6G7DBVT3Y8HSDGGCCP3 437
 themes]—including Twenty Nineteen and Twenty Twenty-One—would still have
 the star inside the Comment label without the explanatory text because
 they edit/remove the 'logged_in_as' argument. And other themes edit the
 [https://wpdirectory.net/search/01FJMMYDNFE0Y9CYRRZN81DWYQ
 'comment_notes_before' text].

 So I also uploaded a simpler option [attachment:"16206.alternative.patch"]
 to focus on the form when users are logged out and are required to fill in
 their name and email. If we go in this direction for now, we still could
 consider a method to show the symbol and required message for everyone
 later.


 ==== Twenty Seventeen and other themes, before the patch

 Logged out, name & email are not required:
 - default 'comment_notes_before' text: `Your email address will not be
 published.`
 - No fields have * symbol

 Logged out, name & email required:
 - default 'comment_notes_before' text: `Your email address will not be
 published. Required fields are marked *`
 - Only Name and Email have * symbol, Comment and URL are available

 Logged in (whether or not name & email are required):
 - default 'logged_in_as' text: `Logged in as test. Log out?`
 - No fields have * symbol (only Comment is available)


 ==== With 16206.alternative.patch

 This patch adds the symbol to the Comment label when user is not logged in
 and their name ans email are required.

 Logged out, name & email are not required:
 - default 'comment_notes_before' text: `Your email address will not be
 published.`
 - No fields have * symbol

 Logged out, name & email required:
 - default 'comment_notes_before' text: `Your email address will not be
 published. Required fields are marked *`
 - **Comment,** Name and Email have * symbol

 Logged in (whether or not name & email are required):
 - default 'logged_in_as' text: `Logged in as test. Log out?`
 - No fields have * symbol (only Comment is available)


 ==== With 16206.9.patch

 The Comments label has symbol, regardless of `require_name_email` setting
 or user login status. The default 'comment_notes_before' and
 'logged_in_as' text arguments include the required message.

 Logged out, name & email are not required:
 - default 'comment_notes_before' text: `Your email address will not be
 published. Required fields are marked *`
 - Comment is the only label with * symbol

 Logged out, name & email required:
 - default 'comment_notes_before' text: `Your email address will not be
 published. Required fields are marked *`
 - Comment, Name and Email have * symbol

 Logged in (whether or not name & email are required):
 - default 'logged_in_as' text: `Logged in as test. Log out? Required
 fields are marked *`
 - Comment label has * symbol, and that is the only default field.

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


More information about the wp-trac mailing list