1.0.13 • Published 3 years ago

@rafcin/live-region v1.0.13

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

Live Regions

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

Installation

yarn add @rafcin/live-region

Import components

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

Usage

import { useLiveRegion } from "@rafcin/live-region"

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