[wp-trac] [WordPress Trac] #43376: Semantic elements for non-link links: class-wp-comments-list-table.php

WordPress Trac noreply at wordpress.org
Sun Feb 25 16:14:20 UTC 2018


#43376: Semantic elements for non-link links: class-wp-comments-list-table.php
--------------------------+----------------------------------------
 Reporter:  audrasjb      |       Owner:  afercia
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  5.0
Component:  Comments      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  accessibility, javascript
--------------------------+----------------------------------------
Changes (by afercia):

 * owner:   => afercia
 * status:  new => assigned
 * focuses:  accessibility => accessibility, javascript
 * milestone:  Awaiting Review => 5.0


Comment:

 The comments screen works in a slightly different way compared to the
 Posts and Terms screens. Changing the Quick Edit link to a button will
 change the Reply link too. That's fine because both work in the same way:
 they're not available when JavaScript is off and they open their own form.
 The JavaScript part needs to take into account both cases.

 In [attachment:43376.diff] :
 - the Reply and Quick Edit links are now buttons
 - they have an `aria-expanded` attribute, dynamically updated based on the
 form collapsed / expanded state
 - when closing the Reply or Quick Edit forms, focus is moved back to the
 proper button
 - I've slightly refactored the JS part to use more meaningful variable
 names: `commentRow` and `replyRow`
 - removes `e.preventDefault()` which is no longer necessary, as the links
 are not buttons with an attribute `type="button"`, i.e.: there's no
 default action to prevent

 Tested and looks good to me. Some more testing welcome!

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


More information about the wp-trac mailing list