[wp-trac] [WordPress Trac] #54260: Add accessible labels to pagination links

WordPress Trac noreply at wordpress.org
Sat Sep 28 22:37:21 UTC 2024


#54260: Add accessible labels to pagination links
---------------------------+----------------------------
 Reporter:  michaelbourne  |       Owner:  joedolson
     Type:  enhancement    |      Status:  accepted
 Priority:  normal         |   Milestone:  6.7
Component:  General        |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:  accessibility
---------------------------+----------------------------

Comment (by joedolson):

 The main change in the updated PR is that pagination patterns use 'Posts
 pagination' where navigation patterns use just 'Posts'. The `nav` element
 will be read by screen readers as "posts navigation" if it's a prev/next
 navigation pattern; and as "posts pagination navigation" if it's
 pagination. This helps to differentiate the two types of navigation and
 provides meaningful context for the numbered links inside that region.

 We do need to remove the change to use
 `get_queried_object()->labels->name`, however. As nice as it would be to
 use the post name, I had failed to take into account that using post names
 in generic strings creates a translation problem, because different post
 type names may have different genders in various languages, and
 translations can't dynamically account for that.

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


More information about the wp-trac mailing list