-
Notifications
You must be signed in to change notification settings - Fork 0
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 pagination according to mockupos #119
Conversation
Pull Request Test Coverage Report for Build 8007744021Details
💛 - Coveralls |
d23e027
to
1a60351
Compare
1a60351
to
6bb9972
Compare
** Why are these changes being introduced: * The GDT project has called for an update to how pagination is shown, across all instances of this app. The details are linked from the ticket below. ** Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/gdt-172 ** How does this address that need: * The visual display of the pagination links is changed, including which data points are included. Importantly, we are moving from a display that uses page numbers to one that uses result counts - so there are changes to the analyzer model to reflect this UI. * We also improve the accessibility of the pagination element by using a nav element, and adding aria labels to make the screen reader output more coherent. * Tests for both the helper and analyzer are also updated to expect the new markup. ** Document any side effects to this change: * The analyzer test gets some additional assertions because of the calculations for the first and last record in the overall range. * The div containing the summary of the current page is still wonky on a screen reader, lacking context in its output: "21 40 of 95" for example. I'd like to ask about this during QA, however, but would encourage the reviewer to listen using VoiceOver to experience it for yourself.
6bb9972
to
496974c
Compare
The Codeclimate flag is complaining about the complexity of the initialize method on the analyzer - which now does more calculation directly. I'm open to making the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with your screen reader a11y concerns. My instinct is to eschew the dash altogether and have it read as, e.g., 1 to 20 of 100
, but if that's too visually unappealing, then sr
tags feel viable (albeit a bit messier). I think we should mention this to Darcy during QA and suggest a few options.
Not at all worried about CodeClimate's complexity concern. It's only a hair above the threshold, anyway.
Thanks for the quick turnaround on this!
Why are these changes being introduced:
The GDT project has called for an update to how pagination is shown, across all instances of this app. The details are linked from the ticket below.
Relevant ticket(s):
https://mitlibraries.atlassian.net/browse/gdt-172
How does this address that need:
The visual display of the pagination links is changed, including which data points are included. Importantly, we are moving from a display that uses page numbers to one that uses result counts - so there are changes to the analyzer model to reflect this UI.
We also improve the accessibility of the pagination element by using a nav element, and adding aria labels to make the screen reader output more coherent.
Tests for both the helper and analyzer are also updated to expect the new markup.
Document any side effects to this change:
The analyzer test gets some additional assertions because of the calculations for the first and last record in the overall range.
The div containing the summary of the current page is still wonky on a screen reader, lacking context in its output. For example, the text
21 - 40 of 95
is read as:My instinct would be for output like:
However, that would involve either extensive screenreader-only spans (which are read individually, it seems?), or clobbering the whole element with an aria-label, which feels like overkill.
I'd like to ask about this during QA, however, but would encourage the reviewer to listen using VoiceOver to experience it for yourself.
Developer
Environment
Accessibility
our guide and
all issues introduced by these changes have been resolved or opened as new
issues (link to those issues in the Pull Request details above)
Stakeholder
Requires database migrations?
NO
Includes new or updated dependencies?
NO
Code Reviewer
(not just this pull request message)