Skip to content

[Content request] How to build accessible pagination with WordPress functions? #7

@Rosita311

Description

@Rosita311

I built my own theme and have two types of pagination. In the archive, I use paginate_links(); But when I run Lighthouse on my archive, it says this:

"Lists do not contain only <li> elements and script-supporting elements (<script> and <template>)."

That's because I now have a nested <ul>, which is incorrect (see image).
Shouldn't I change <ul class="pagination-list"> to a <div>?
My question to you is, can you also explain in your documentation how to build accessible content with WordPress functions?
And maybe I should even use the_posts_pagination(); because it's newer, but I haven't figured out how to add my own classes and SVGs to it yet.
See the documentation: https://developer.wordpress.org/themes/functionality/pagination/#numbered-pagination
And my pagination: https://www.rulesbyrosita.nl/blog/

Image

And Lighthouse noticed something in the commentform(); Where there's an aria-hidden="true" in the textarea and I can't get it out.
https://developer.wordpress.org/reference/functions/comment_form/

Image

If it's helpfull: here is a link to my repository: https://github.com/Rosita311/rules-by-rosita

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions