1.0.2 • Published 3 months ago

feed-a11y v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

feed-a11y

bundle size check MIT License

headless and accessible feed component for React.

Features

Demo

https://caprolactam.github.io/feed-a11y/

Install

npm install feed-a11y

Usage

import * as Feed from 'feed-a11y'

export default () => (
  <Feed.Root>
    <Feed.RootTitle />
    <Feed.Item>
      <Feed.ItemTitle />
    </Feed.Item>
  </Feed.Root>
)

API

Root

PropTypeDefaultDescription
loadingboolean-To convey the loading state to users using assistive technologies.
asChildbooleanfalseChange the default rendered element for the one passed as a child, merging their props and behavior.

RootTitle

PropTypeDefaultDescription
asChildbooleanfalseChange the default rendered element for the one passed as a child, merging their props and behavior.

Item

PropTypeDefaultDescription
asChildbooleanfalseChange the default rendered element for the one passed as a child, merging their props and behavior.

ItemTitle

PropTypeDefaultDescription
asChildbooleanfalseChange the default rendered element for the one passed as a child, merging their props and behavior.

Accessibility

Keyboard Interactions

KeyDescription
Page UpMove focus to previous article.
Page DownMove focus to next article.
Control + HomeMove focus to the first focusable element before the feed.
Control + EndMove focus to the first focusable element after the feed.

FAQs

React version? Requires React 18, because using useId internally.

Combination with virtualization? Not supported, because it's not possible to manage focus properly.

Contribute

If you have issues or questions, feel free to create an issue or pull request.

1.0.2

3 months ago

1.0.1

3 months ago

1.0.0

3 months ago