Infinite Scrolling Feed Example
- -About This Example
-- NOTE: The feed role was introduced by WAI-ARIA 1.1. - Since native desktop operating systems offer only a few conventions that are applicable to the feed pattern, the implementation of a feed illustrated by this example is intended to serve as as a proposal. - Feedback is welcome in issue 565. -
-- The example below implements the Feed Pattern for a restaurant review site. - To imitate an infinitely scrolling set of data, information about ten restaurants is repeatedly loaded as the user reads the feed. - This example includes an article load time selector that simulates data fetch delays. -
-Example Usage Option
-- The following article loading delay time selector enables simulation of different amounts of latency introduced by data fetches. - Such latency can affect assistive technology behavior when using assistive technology functions for navigating by article. -
- - -Example
-The example feed experience below is presented in an iframe in order not to obstruct from the rest of the content of the page.
Keyboard Support
-| Key | -Function | -
|---|---|
| Page Down | -Move focus to next article. | -
| Page Up | -Move focus to previous article. | -
| Control + End | -Move focus to the first focusable element after the feed. | -
| Control + Home | -Move focus to the first focusable element in the feed. | -
Role, Property, State, and Tabindex Attributes
-| Role | -Attribute | -Element | -Usage | -
|---|---|---|---|
feed |
- - | div |
-
-
|
-
| - | aria-labelledby="IDREF" |
- div |
- Provides an accessible name for the feed element. | -
| - | aria-busy="true" |
- div |
-
-
|
-
article |
- - | div |
-
-
|
-
| - | tabindex="0" |
- div |
-
-
|
-
| - | aria-labelledby="IDREF_LIST" |
- div |
-
-
|
-
| - | aria-describedby="IDREF_LIST" |
- div |
-
-
|
-
| - | aria-posinset="INTEGER" |
- div |
-
-
|
-
| - | aria-setsize="INTEGER" |
- div |
- Set to the total number of articles currently contained by the feed element. | -
JavaScript and CSS Source Code
-The following JavaScript and CSS is used by the feed-display.html page:
--
-
- CSS: feedDisplay.css -
- JavaScript: feed.js, feedDisplay.js, main.js, utils.js -
HTML Source Code
-Please open feed-display.html and view source.
-