Problem/Motivation

Currently, the following are displayed and disabled, they are clickable and do not have the required attributes:

- First page
- Previous page
- Previous Ellipsis
- Next Ellipsis
- Page suivante
- Last page

According to the DSFR , disabled links must not have an href attribute, and must have the following attributes: aria-disabled="true" & role="link".

source : https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/pa...

Current:
<a class="fr-pagination__link fr-pagination__link--first" href=""> Première page </a>

Expected:
<a class="fr-pagination__link fr-pagination__link--first" aria-disabled="true" role="link"> Première page </a>

Steps to reproduce

Access a paginated list page and check the markup.

Proposed resolution

I suggested to :
- Add the role and aria-disabled attributes when creating links that are supposed to be empty
- Delete the hard-coded href in the link tag and use the setAttribute('href') method as for the other links.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Martygraphie created an issue. See original summary.

pdureau’s picture

Title: Accessibility problem: disabled pagination links don't restore the right attributes. » {beta5] Accessibility problem: disabled pagination links don't restore the right attributes.

Sounds good. Added to the beta5 scope.

Tell me when ready to be reviewed.

pdureau’s picture

Title: {beta5] Accessibility problem: disabled pagination links don't restore the right attributes. » [beta5] Accessibility problem: disabled pagination links don't restore the right attributes.
martygraphie’s picture

Status: Active » Needs review

I forgot to passed in need review !

pdureau’s picture

Assigned: Unassigned » pdureau

Your merge is blocked, so I will need to rebase it locally first

pdureau’s picture

Assigned: pdureau » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.