• Resolved Ate Up With Motor

    (@ate-up-with-motor)


    Is there any way to get Miniva to apply aria-label attributes to pagination links? For accessibility purposes, this is recommended so that numerical link text doesn’t confuse screen readers. Does Miniva provide any means of adding those attributes?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author Tajam

    (@tajam)

    The pagination in this theme has an aria label but only on the nav element, not on the links. We use the built-in WordPress function the_posts_pagination() which currently doesn’t have aria label for the links.

    Thread Starter Ate Up With Motor

    (@ate-up-with-motor)

    I had thought WordPress 5.3 now had that functionality, according to this post:

    Use aria-label to ensure Posts and Comments navigation has proper context in WordPress 5.3

    … which says, “All these functions [including the_posts_pagination()] now implement aria_label parameter which can be used to pass custom value for the related HTML attribute.”

    I don’t understand the functions well enough to actually implement that, but it implies it’s now possible, although it’s also entirely possible I may be misunderstanding that post.

    Theme Author Tajam

    (@tajam)

    The new feature in 5.3 is for the aria-label in the nav element.

    View post on imgur.com

    Unfortunately there is still no feature to add aria-label for each link. And there is no easy way to modify the html output because no hook for it inside the function.

    Have you tried using any pagination plugins?

    Thread Starter Ate Up With Motor

    (@ate-up-with-motor)

    Ah, okay — I misunderstood the extent of the new hooks. (I’m not a developer, so a lot of that stuff is only marginally comprehensible to me.) That would explain why I haven’t seen any way to do it (in plugins, either). Thanks for taking the time to clarify it for me!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding aria-label to pagination?’ is closed to new replies.