[wp-trac] [WordPress Trac] #35577: Menus screen: improve the "View All" tab panels pagination links

WordPress Trac noreply at wordpress.org
Sun Oct 16 17:13:29 UTC 2016


#35577: Menus screen: improve the "View All" tab panels pagination links
-------------------------------------+-------------------------------------
 Reporter:  afercia                  |       Owner:  afercia
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.7
Component:  Menus                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-screenshots has-     |     Focuses:  ui, accessibility,
  patch                              |  javascript
-------------------------------------+-------------------------------------
Changes (by afercia):

 * keywords:  has-screenshots ui-feedback good-first-bug has-patch => has-
     screenshots has-patch
 * focuses:  ui, accessibility => ui, accessibility, javascript


Comment:

 Refreshed patch with a new approach. Uses the existing arguments to add
 some screen reader text and aria labels. A similar approach is used, for
 example, on the bundled Themes and works pretty well. The CSS part
 increases a bit the links clickable area, see in the screenshot below (the
 background color is just for testing purposes):

 [[Image(https://cldup.com/5OQJa9iXi9.png)]]

 There are also 3 JavaScript issues to solve.

 1
 Since the links now contain a `<span>` element, the JS part can't rely on
 the click event target and needs to be changed.

 2
 Pre existing issue: when clicking on the current page number (the one
 ''without'' a link) there's no `href` attribute to replace, thus a JS
 error:

 [[Image(https://cldup.com/KJpbDM2NrC.png)]]

 3
 Pre existing issue: when clicking on the pagination links, the whole list
 below gets rebuilt and inserted in a new `<div>` element. For each click,
 a new div gets inserted and after several clicks there's a proliferation
 of `<div>`s:

 [[Image(https://cldup.com/n3m9BbG4Qu.png)]]

 I'd propose to simplify this part: while using DOM methods is nicer,
 jQuery can do this with a single line of code. I'd greatly appreciate a JS
 review to be sure the patch is not braking anything :) /cc @azaozz

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


More information about the wp-trac mailing list