[wp-trac] [WordPress Trac] #32399: List table: Lists of items should inform users about the "current view" being displayed
WordPress Trac
noreply at wordpress.org
Sat Sep 30 02:26:57 UTC 2017
#32399: List table: Lists of items should inform users about the "current view"
being displayed
------------------------------------+--------------------------------
Reporter: afercia | Owner: afercia
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.9
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: aria-current has-patch | Focuses: ui, accessibility
------------------------------------+--------------------------------
Comment (by flixos90):
[attachment:32399.diff] looks good to me.
I'm a little worried about the code there getting more and more complex
with more of these (necessary) changes going in. I wonder whether we
should introduce a general function to deal with creating the arrays of
links that are so commonly used in the backend.
It could be a function `get_admin_status_links( $link_data )` (let's find
a better name though) where `$link_data` is an associative array where
each key is the link identifier and each value is an array containing data
for the actual link element (`href` and `label` at least). The logic to
transform that data into a link element string could be handled in that
function, and changes like those from this ticket would be much simpler as
they'd only need to be changed in one place.
Such a function should be introduced in a separate ticket though.
Depending on how urgent this fix here is, we could do it one or the other
way. It would be a bit easier to have the function first, but it's more
initial work to set this up, so if we need to have this here in 4.9, we
can always still create the function later.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32399#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list