headless and accessible feed component for React.
Features
- Keyboard navigation Interaction.
- ARIA roles and states link.
https://caprolactam.github.io/feed-a11y/
npm install feed-a11y
import * as Feed from 'feed-a11y'
export default () => (
<Feed.Root>
<Feed.RootTitle />
<Feed.Item>
<Feed.ItemTitle />
</Feed.Item>
</Feed.Root>
)
Prop | Type | Default | Description |
---|---|---|---|
loading | boolean | - | To convey the loading state to users using assistive technologies. |
asChild | boolean | false | Change the default rendered element for the one passed as a child, merging their props and behavior. |
Prop | Type | Default | Description |
---|---|---|---|
asChild | boolean | false | Change the default rendered element for the one passed as a child, merging their props and behavior. |
Prop | Type | Default | Description |
---|---|---|---|
asChild | boolean | false | Change the default rendered element for the one passed as a child, merging their props and behavior. |
Prop | Type | Default | Description |
---|---|---|---|
asChild | boolean | false | Change the default rendered element for the one passed as a child, merging their props and behavior. |
Key | Description |
---|---|
Page Up | Move focus to previous article. |
Page Down | Move focus to next article. |
Control + Home | Move focus to the first focusable element before the feed. |
Control + End | Move focus to the first focusable element after the feed. |
React version? Requires React 18, because using useId
internally.
Combination with virtualization? Not supported, because it's not possible to manage focus properly.
If you have issues or questions, feel free to create an issue or pull request.