[wp-trac] [WordPress Trac] #37228: Consider to rethink and improve the list tables pagination links

WordPress Trac noreply at wordpress.org
Wed May 20 08:52:58 UTC 2026


#37228: Consider to rethink and improve the list tables pagination links
----------------------------+---------------------------------------------
 Reporter:  afercia         |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  Administration  |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  ui, javascript, administration
----------------------------+---------------------------------------------
Changes (by jorgelopezrepiso):

 * keywords:  has-screenshots needs-patch => has-patch
 * focuses:  ui => ui, javascript, administration
 * version:   => trunk


Comment:

 I have attached two .diff patches (one for PHP and one for JS) to unify
 both top and bottom paginations, showing the input field only when there
 are 4 or more pages.

 In wp-admin/includes/class-wp-list-table.php, inside the pagination()
 method, instead of checking if it is top or bottom first, I now check the
 total number of pages ($total_pages). After that, I check for top only to
 preserve the accessibility features provided by the original label for the
 input.

 In common.js, I removed a couple of lines and, at the end of the main
 wrapper (IIFE), I added an event listener to catch the Enter key press
 (key 13).

 Tested on WP 7.0 RC. It works fine in my local tests.

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


More information about the wp-trac mailing list