From 5f7c36b6ebf70aa56d132e63f0d4ce1f171554d2 Mon Sep 17 00:00:00 2001 From: Sean Perkins Date: Thu, 25 Aug 2022 22:52:16 -0400 Subject: [PATCH] docs(infinite-scroll): accessibility best practice for role="feed" --- docs/api/infinite-scroll.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/api/infinite-scroll.md b/docs/api/infinite-scroll.md index 6ccc264e906..f45ba5b3e80 100644 --- a/docs/api/infinite-scroll.md +++ b/docs/api/infinite-scroll.md @@ -61,6 +61,34 @@ Infinite scroll requires a scroll container to function. When using a virtual sc ``` +## Accessibility + +Developers should assign the `role="feed"` attribute to the scrollable list of items that are added to or removed from as the user scrolls. + +Individual list items should either have `role="article"` or use the `
` element directly. + +For example, when rendering a collection of items in an `ion-list`: + +```html + + + + First item + + + Second item + + ... + + + + + + +``` + +Please refer to the [ARIA: feed role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/feed_role) documentation for additional information. + ## Interfaces ### InfiniteScrollCustomEvent