Closed pauljacobson closed 4 years ago
@pauljacobson This is probably a better fit for the public Jetpack repo:
https://github.com/Automattic/jetpack
... since this is a reproducible enhancement request. I'm going to transfer this there.
what the user wants is a different post pagination option where they can click through to different pages (like this).
Such options can only be handled by a custom plugin or some extra code in the theme, since it does not come with WP or Jetpack by default. This plugin, for example, could work: https://wordpress.org/plugins/wp-paginate/
That's not really an option on WordPress.com, though. Maybe you could try with the Archives shortcode instead? https://en.support.wordpress.com/archives-shortcode/
All in all, this may be a good enhancement request for Infinite Scroll, but we don't currently work on that feature so it may not be implemented any time soon.
There was a +1 for a pagination option in 13663437-hc.
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.
Just jumping in to do some testing here. Referring back to the original request, I am not sure the reporter managed to get in the state they were after.
The user disabled Infinite Scroll They clicked on the resulting "Older posts" button They noticed that the "cursor either jumps to the far top or to a random spot on the page and the screenreader starts reading from there".
If infinite scroll was disabled fully, the "older posts" button would not have been visible, or visible alongside paginated numbers. A quick test in both Twenty Nineteen and Twenty Sixteen for example show the default paginations options work as they hope them to:
This leads me to believe they had not turned off infinite scroll fully. There are three options in the infinite scroll section:
I believe they are currently set to this middle option (highlighted), setting it to "the default theme behaviour" should have solved this issue (providing their theme supported numbered pagination).
There does appear to be a valid accessibility issue with the load more button option, I will see if I can get that fixed.
Pull request opened: https://github.com/Automattic/jetpack/pull/16104 - feedback on the implementation welcome.
Summary
A user came into chat with the following request:
At first I thought this was an Infinite Scroll issue. The user disabled the option in
Settings
>Writing
. The result was a button reading "Older posts". This didn't really resolve the issue, though. We explored this a little further, and the user explained what they were experiencing:It seems like there's some sort of interaction between their screen-reader and the site when the user clicks on that button to load older posts. Instead of allowing the user to scroll down to see older posts, the screen-reader seems to take them away from that point.
What the user wants
Ideally, what the user wants is a different post pagination option where they can click through to different pages (like this). I remember seeing this pagination option last year when we were dealing with a rush of Infinite Scroll issues on sites. Most themes had three options:
I'm pretty sure one of these options was what the user's aiming for. I tested a number of themes (Independent Publisher 2, Twenty Nineteen, Twenty Sixteen, and Penscratch - I believe), and they all have a binary option for pagination - either Infinite Scroll is active, or the theme uses the "Older posts" button.
A possible solution
Barring a theme that has the sort of pagination option the user's looking for, I thought about using a page with a shortcode along these lines:
[display-posts posts_per_page="5" wrapper="div" include_excerpt="true" image_size="medium"]
The main thing here is the
posts_per_page="5"
parameter. I hoped that this would give the user an option to create a similar result, but using a Display Posts Shortcode. When I added the shortcode, I only saw the five posts the shortcode, but no pagination links.I then added a Page Break block (the
<!--nextpage-->
option behaves the same way), and although the pagination worked, the subsequent pages didn't display the posts because the shortcode was on the first page.@GaryJones made the following suggestion in a comment on my P2 post (link below):
The user asked to be kept updated on possible solutions.
Steps to Reproduce
Expected Result
The screen reader should retain a focus on either the location of the "Older posts" or, preferably, the title of the first post loaded by clicking on that button.
Actual Result
The cursor jumps to other parts of the site, away from the newly loaded posts, making it very difficult for a user reliant on a screen reader to browse through additional posts.
Site Info