alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.18k stars 325 forks source link

Pagination links for 'next' and 'previous' pages should be understandable even when out of context #3679

Closed CharlotteDowns closed 1 year ago

CharlotteDowns commented 1 year ago

This issue is from May 2023 external accessibility audit report.

WCAG Reference: 2.4.9 Link Purpose (Link Only) (Level AAA) Understanding Link Purpose (Link Only) | How to Meet Link Purpose (Link Only)

Issue ID: DAC_Link_Purpose_Out_Of_Context_02

URLs: https://govuk-frontend-pr-3503.herokuapp.com/full-page-examples/search

Screen shots

Pagination example

The ‘Next’ and ‘Previous’ links in the pagination do not possess additional link text of ‘page’ or similar to inform users of screen reading assistive technologies of their purpose when viewing the links out of context using the link text alone.

Current code ref(s)

#main-content > form > div.govuk-grid-row > div.govuk-grid-column-two-thirds > nav > div.govuk-pagination__prev > a

Screen-reader comments

“Within the pagination section I identified two links which announced to me as ‘Previous’ and ‘Next’. When situated out of context it may not be immediately clear to all screen reader users what the ‘Next’ and ‘Previous’ links related to.

Adding the phrase ‘Page’ to the next and previous links will enable all screen reader users to make a quick and easy selection.”

“When navigating in context and out of context, I noticed two links ‘previous’ and ‘next’ as I did not know what this referred to. I found this to be confusing because of the two links which are not clear as this would make it difficult for users to navigate in context or out of context may not pick up what the links are. It would be helpful if the links previous and next could be labelled as previous page and next page.”

Solution

Ensure that links are descriptive enough when navigating out of context, allowing for users of screen reading assistive technologies to discern their purpose and functionality when doing so. Consider adding the text ‘page’ to the ‘next’ and ‘previous’ pagination links ot clearly identify that that is what they are used for.

dav-idc commented 1 year ago

This issue has been assessed to not be a high-severity accessibility concern. It doesn't appear to meet any of our 3 criteria for a high-severity accessibility concern.

As such, this will not be flagged as a high-priority issue.

In the coming weeks we will investigate whether it fails WCAG level AAA criterion: 2.4.9 Link Purpose (Link Only).

36degrees commented 1 year ago

Even though this is not a high-priority issue, we think this is likely to be a breaking change, so we're going to try to fix it as part of v5.0.