Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@chakra-ui/live-region

chakra-ui2.1mMIT2.1.0TypeScript support: included

Aria live region for React components

aria, screenreader, feedback, accessibility, a11y, react, chakra ui

readme

Live Regions

ARIA Live Regions are used to communicate important information to screen reader software.

Installation

yarn add @chakra-ui/live-region

Import components

import { LiveRegion, useLiveRegion } from "@chakra-ui/live-region"

Usage

import { useLiveRegion } from "@chakra-ui/live-region"

function Example() {
  const region = useLiveRegion()
  return (
    <button
      onClick={() => {
        region.speak("Filtering categories was successful")
      }}
    >
      Click me
    </button>
  )
}