Load more
ProThe end of a list loaded a page at a time: loads as the end comes near, with Load more, a loading state and Retry. Not an M3 component (@windmorph/react-pro).
import { LoadMore } from '@windmorph/react-pro';Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.
Keyboard
| Key | Action |
|---|---|
| Tab | Moves focus to Load more (or Retry after a failure), and on to the next element. |
| Enter or Space | Loads the next page, or retries the one that failed. |
Loading as the end comes near works for pointer and touch scrolling; the Load more button is the fallback for keyboard and screen-reader users, so it shows whenever there is more to load.
Screen reader
- Role
- Load more and Retry are
buttons. The default loading indicator is aprogressbar. - Accessible name
- The buttons are named by
labels.loadMoreandlabels.retry; the loading indicator bylabels.loading("Loading more"). - States announced
- None on the buttons.
- A failure's message (
labels.error) is read politely through a visually hiddenstatusregion that is in the page from the start, so it is always announced; the visible copy beside Retry is hidden from screen readers so it is not read twice. - Once all is loaded it shows nothing, or the
endMessageyou pass.
Focus
- Load more sits in the Tab order after the list, where the component is placed.
- Focus never drops to the top of the page. While focus is inside it (after a press on Load more or Retry, or on Load more as it starts loading by itself), it holds focus on its root while the page loads (or once all is loaded), then moves it to the next Load more or Retry. It moves focus without the browser's centring scroll; when the person is using the keyboard, a Load more or Retry that the new page pushed out of view (of the window or a scrolling list) is brought back into view with a nearest scroll, and tabbing to Load more brings it into view.
- The root shows the M3 focus indicator while it holds focus from the keyboard.
- Keyboard focus on the buttons shows M3's focus indicator: a 3px
secondaryoutline 2px outside the button.
Touch target
Load more and Retry are small (40px tall) Buttons, each with an invisible 48 × 48px touch target.
Motion
It has no motion of its own. The default LoadingIndicator only rotates under reduced motion, and the buttons follow Button: their press ripple appears at full size without growing.
What you need to do
- Pass every word through
labels(loadMore,retry,error,loading) so they come from your translations. - A custom
loadingIndicator(a skeleton of one item, say) needs its own accessible text, or a busy state on the list, since the default indicator's name is gone. - Focus stays on Load more for the next page; if your readers should go to the first new item instead, move focus there yourself once it has loaded.
- It opts out of scroll anchoring, so a new page goes in below what is on screen without moving the page; avoid turning
overflow-anchorback on around it. - Set
statustodonewhen there is nothing more, so the button goes.