Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default aria-label in Pagination component #3899

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

querkmachine
Copy link
Member

@querkmachine querkmachine commented Jul 3, 2023

In the recent audit of GOV.UK Frontend, it was flagged that the default aria-label of 'results' did not describe the purpose of the region adequately. The component is not a list of results, but a list of pages. The audit suggested we change the label to 'Results pagination'.

Taking into mind that the pagination component is designed for use in contexts that are not related to showing results—such as the previous/next variation, which is intended for navigating between content pages—I have further simplified this to 'Pagination'.

Although this may now be too generic, something 'generic' strikes me as being a more appropriate default than something specific enough to be incorrect or misleading. I still worry that it might be too much of a technical term to be well understood. Happy to hear other views on this.

Resolves #3684.

@querkmachine querkmachine self-assigned this Jul 3, 2023
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3899 July 3, 2023 15:15 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3899 July 3, 2023 15:39 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3899 July 3, 2023 15:40 Inactive
@querkmachine querkmachine requested a review from dav-idc July 3, 2023 15:44
@querkmachine querkmachine marked this pull request as ready for review July 3, 2023 15:44
peteryates added a commit to x-govuk/govuk-components that referenced this pull request Jul 3, 2023
After an accessibility audit it was decided that 'results' isn't
specific or descriptive enough.

alphagov/govuk-frontend#3899
@36degrees
Copy link
Contributor

I still worry that it might be too much of a technical term to be well understood. Happy to hear other views on this.

I share your worry, though I've got no data to back it up. Wondering if 'pages' might be better?

Interesting that Bootstrap suggest 'Search results pages' as an example (introduced in twbs/bootstrap#19704), though as you say it's dependent on context.

@dav-idc
Copy link

dav-idc commented Jul 3, 2023

How about a label thats a bit more of a phrase, rather than "results pagination"?

Something like "Navigation for results pages".

@querkmachine
Copy link
Member Author

@davidc-gds Would you still expect that to be used on the previous/next variant of the pagination too?

@dav-idc
Copy link

dav-idc commented Jul 3, 2023

@davidc-gds Would you still expect that to be used on the previous/next variant of the pagination too?

@querkmachine I might be missing some context as to why it wouldn't work for the 'previous / next' variant, but at first glance, I feel like the 'previous / next' variant is still a form of navigation for results pages. You use the previous and next links to navigate between results pages, yeah? 🤷

So a non-confident 'yes' from me on it applying to both variants.

@36degrees
Copy link
Contributor

Something like "Navigation for results pages".

Bear in mind that it's a navigation landmark, so it may be announced as 'Navigation for results pages, navigation'?

'Pages of results'? 🤷🏻‍♂️

@querkmachine
Copy link
Member Author

You use the previous and next links to navigate between results pages, yeah? 🤷

@davidc-gds I didn't think so? If the intended use is the same as demonstrated in the Publishing Components version then the intent is that it's used to navigate between related pages in a set. You can see it in use at the bottom of travel advice pages.

In this context it's unrelated to searching or results, it's basically just a faster way of navigating between pages in a table of contents.

@dav-idc
Copy link

dav-idc commented Jul 4, 2023

Ahh thanks @querkmachine I misinterpreted the use-case for the 'previous and next' pagination, yep. My bad!

After thinking on the above comments from you and @36degrees, I can think of only a few alternatives to 'pagination'.

It might be worth looping in @claireashworth or @calvin-lau-sig7 for a second opinion on the wording.

The ones I've come up with, which avoid the word 'navigation' and also should work okay for the 'next / previous page' variant are:

  • pagination (AKA go with what we have)
  • page picker
  • page selector

I'm personally thinking we just stick with 'pagination' even though it's not an ideal descriptor. Both 'picker' and 'selector' have other meanings or uses in web development.

@claireashworth
Copy link
Contributor

Hmm
So this description needs to work for both navigating through pages and a return showing a list of pages? If so, that makes it harder to be accurate and succinct.
Other options which might work are:

  • page sequence
  • page series
  • page order
  • page results
  • page count
  • page list results

But these don't work as well for page navigation.

@querkmachine
Copy link
Member Author

querkmachine commented Jul 10, 2023

I'm personally happy to stick with 'pagination', as although it's a bit of a technical term, it's one that seems to be supported by a number of sources.

Although this is a small subset of sites, it certainly seems like 'pagination' is what is recommended by some fairly authoritative groups and people, and it's what existing screen reader users of GOV.UK will have encountered in the past.

@querkmachine querkmachine requested a review from a team July 10, 2023 10:23
@dav-idc
Copy link

dav-idc commented Jul 11, 2023

I'd like to get another revisited thought from @claireashworth to see if just 'pagination' seems fine.

From my perspective, it seems we've done a thorough search for alternative phrases, and nothing seems to work for both the list of page numbers version and the 'next / previous' version.

So I'm personally ok with moving forward with 'pagination', based on that work we did.

@claireashworth
Copy link
Contributor

Yes, let's try pagination. We can revisit another time if it's causing issues.

@querkmachine querkmachine merged commit 78a0111 into main Jul 11, 2023
25 checks passed
@querkmachine querkmachine deleted the update-pagination-label branch July 11, 2023 16:16
colinrotherham pushed a commit that referenced this pull request Jul 19, 2023
Update default `aria-label` in Pagination component
@romaricpascal romaricpascal mentioned this pull request Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pagination aria-label="results" does not inform the user of the purpose of the region
6 participants