-
Notifications
You must be signed in to change notification settings - Fork 84
a11y updates to full-text-search pages #4964
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
base: master
Are you sure you want to change the base?
Conversation
A11y Syntax NotesOLH theme has space around sections, so when they are put in to make landmarks, this can cause layout shifts. So now we have a class for when these are being used 'invisibly' to provide landmarks. section.invisible-landmark{
padding: 0;
margin: 0;
}Currently this is only a concern on OLH, as the other two themese don't ahve spacing, however it may be useful to extend this to all three themes and markup any sections that are purely to provide aria landmarks with this class. |
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.
Looks good. Found a few small bugs, and also added a few comments about readability around keeping this code distinct from the templates and patterns that belong to GenericFacetedListView, which granted are not very well documented as belonging specifically to it!
mauromsl
left a comment
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.
nice, just one comment regarding the value "all" for the pagination queryparameter
src/journal/views.py
Outdated
|
|
||
| paginate_by = request.GET.get("paginate_by", 25) | ||
| if paginate_by == "all": | ||
| paginate_by = len(articles) if articles else 25 |
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.
In terms of implementation, qs.count() is always preferred for querysets over len(qs)
I wonder, however, if we really want to support "all" as a feature, since we do not have a dynamic loader for this, we could put a lot of strain on the server. I don't think the user will be happy waiting for potentially thousands of results to be returned and displayed all at once
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.
We use if paginate_by == "all" in several places, in commits spanning several developers over several years.
While you raise a good point, I think addressing it here is out-of-scope, and that should be its own issue, considered through triage etc, as to whether to change our practice and update across the whole codebase. Using it here is consistent with its use elsewhere.
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.
fair enough, we still want articles.count() over len(articles) to avoid the implicit query and then we are good to merge
mauromsl
left a comment
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.
One last tidbit + one conflict resolution before we can merge
ec0b617 to
372c215
Compare
closes #4839