[wp-meta] [Making WordPress.org] #4814: Pagination broken on themes
Making WordPress.org
noreply at wordpress.org
Thu Apr 2 12:29:07 UTC 2020
#4814: Pagination broken on themes
-----------------------------+-----------------------
Reporter: jonoaldersonwp | Owner: (none)
Type: defect | Status: reopened
Priority: highest omg bbq | Milestone:
Component: Theme Directory | Resolution:
Keywords: seo |
-----------------------------+-----------------------
Comment (by jonoaldersonwp):
We can't move (further) away from server-side rendering unless we have a
pre-rendering/isomorphic solution in place. Given that's unlikely to
happen (and that it'd be an equivalent amount of effort just to do this
right), then we need to make this crawlable, indexable and accessible.
Relying on fudges and no-js hacks isn't a viable option. We need the
behaviour to be correct and optimal without JS, and then to layer in
progressive enhancement. Anything else will (continue to) damage our
discoverability, market share, reputation, etc.
Anoedotally, we're already seeing examples where the current approach
causes unforeseen issues because it's over-engineered. E.g., our recent
addition of lazy loading for images was ineffectual, because we load theme
tiles in an unnecessarily complex manner. We're likely to unearth
''hundreds'' of such issues as we try and get best practices in place for
SEO and accessibility.
Our simplest option is to use a server-side solution which behaves like a
conventional WordPress archive (posts per page, pagination, adaptive
metadata, etc). On top of that, we can add a JS solution for lazy-loading
additional pages as the user scrolls.
With regards to infinite scrolling, we'd need to:
- Use the intersectionObserver API to determine when to lazily load in the
next page's results (NOT scroll detection / viewport positioning, etc;
though [https://github.com/w3c/IntersectionObserver/tree/master/polyfill
polyfill] as necessary
- Use the history API to update the URL (and meta) to /page/n/ as the
browser reaches/triggers those boundaries (in both directions).
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/4814#comment:23>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list