-
Notifications
You must be signed in to change notification settings - Fork 333
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
Conversation
a11ad6e
to
0cff74b
Compare
0cff74b
to
4735741
Compare
After an accessibility audit it was decided that 'results' isn't specific or descriptive enough. alphagov/govuk-frontend#3899
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. |
How about a label thats a bit more of a phrase, rather than "results pagination"? Something like "Navigation for results pages". |
@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. |
Bear in mind that it's a navigation landmark, so it may be announced as 'Navigation for results pages, navigation'? 'Pages of results'? 🤷🏻♂️ |
@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. |
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:
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. |
Hmm
But these don't work as well for page navigation. |
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. |
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. |
Yes, let's try pagination. We can revisit another time if it's causing issues. |
Update default `aria-label` in Pagination component
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.