Skip to content
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

Font Library: Remove infinite scrolling behavior from the Fonts modal dialog #58067

Closed
afercia opened this issue Jan 22, 2024 · 3 comments · Fixed by #58794
Closed

Font Library: Remove infinite scrolling behavior from the Fonts modal dialog #58067

afercia opened this issue Jan 22, 2024 · 3 comments · Fixed by #58794
Labels
[Feature] Font Library [Feature] Typography Font and typography-related issues and PRs [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Jan 22, 2024

Description

See all the relevant discussion about the removal of infinite scrolling from the Core media grid at https://core.trac.wordpress.org/ticket/50105

Infinite scrolling behavior is not accessible for keybaord users. Over time, infinite scrolling proved to not be a good experience for all users at the point many 'big' sites either remove any infinit scrolling behavior or implemented a 'mixed' approach where infinite scrolling works only for the first 2-3 scrolls of a page and then a 'Load more' button is used insteead.

I'm surprised the Font Library user interface adopted infinite scrolling thus ignoring best practices adopted and decisions already made in WordPress Core.

A few options for remediation:

  • Entirely remove infinite scrolling and provide a 'Load more' button.
  • Entirely remove infinite scrolling and provide standard pagination.
  • Implement a 'mixed' behavior where infinite scrolling is in place only the 2-3 first times users scroll and then replace it with a 'Load more' button.

Step-by-step reproduction instructions

  • Go to Site editor > Styles > Typography > click on any font title to open the Fonts modal dialog
  • Click the 'Google fonts' tab within the modal dialog.
  • Observe the list of Google fonts uses infinite scrolling behaviior.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@afercia afercia added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Typography Font and typography-related issues and PRs labels Jan 22, 2024
@matiasbenedetto
Copy link
Contributor

@jasmussen could we have some mockups featuring pagination for font collections?

@jasmussen
Copy link
Contributor

I believe there is a pagination component already that you should be able to use. I wasn't able to directly find it, but the revisions panel is using it, I believe, you can see it here: #57294 — let me know if that works for you.

@afercia
Copy link
Contributor Author

afercia commented Jan 26, 2024

Worth reminding the WordPress Accessibility best practices documented in the Make Accessibility Handbook do have a section about infinte scroll a https://make.wordpress.org/accessibility/handbook/markup/infinite-scroll/
TL:DR
Use pagination instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Font Library [Feature] Typography Font and typography-related issues and PRs [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants