Skip to content
This repository was archived by the owner on Aug 14, 2019. It is now read-only.
This repository was archived by the owner on Aug 14, 2019. It is now read-only.

Improvements for the pagination links semantics #3

@afercia

Description

@afercia

The pagination links should be rendered with proper semantic markup to be correctly exposed to assistive technologies and correctly announced to users.

Disabled links are currently rendered as:
<a class="tablenav-pages-navspan"> ...
Since they're not links, they should be rendered as <span> elements as WordPress currently does, for example:
<span class="tablenav-pages-navspan" aria-hidden="true">«</span>
They should also "look" disabled.

Enabled links are currently rendered as
<a class="next-page"><span class="screen-reader-text">Next page</span><span aria-hidden="true">›</span></a>

however, they're not real links: they don't point to a resource, instead they perform an action thus they should be button elements. This is important not just for the sake of semantics, but also to allow assistive technologies to report them correctly to users: links should be links, buttons should be buttons.

The WP accessibility standards try to recap the decision logic for these cases, see https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/#semantics-for-controls

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions