• Is there a way to add aria-labels to WordPress pagination, both for navigation and pagination within a post? I understand that numeric pagination links should have labels to avoid confusion for screen reader users, but I haven’t a clue how to add those.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The core functions have the parameters for those, but I’m not sure what the defaults are. https://developer.www.ads-software.com/reference/functions/paginate_links/
    Your theme might be calling the function that calls that function with parameters that override the defaults.

    Thread Starter Ate Up With Motor

    (@ate-up-with-motor)

    Is this something that I can add into an existing theme with functions, or does it require building a new theme? I’ve been combing through “accessibility-ready” themes in the repository; none of them seem to add pagination labels out of the box, and I haven’t the first clue how I would add them without building a new theme (which I am not at all qualified to do).

    Your existing theme should be calling the core functions like https://developer.www.ads-software.com/reference/functions/get_the_posts_pagination/ or
    https://developer.www.ads-software.com/reference/functions/the_posts_pagination/
    so you could either ask your theme’s author to make sure the screen_reader_text and aria_label parameters are used or make a child theme to implement it yourself. Or you can switch themes to one that does use these parameters.

    Thread Starter Ate Up With Motor

    (@ate-up-with-motor)

    Okay, but HOW does one implement those parameters? I’m not a developer, and the function references make very little sense. I can recreate components in a child theme or add functions if they aren’t too complicated, but I’d need a tutorial or some coherent examples to figure out how to make any sense of those function references.

    I did some web searches and found no tutorials for this, on WordPress or elsewhere, and none of the “accessibility-ready” themes on www.ads-software.com appear to have implemented those parameters.

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