npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@theaccessibleteam/a11y-feedback-react

v2.0.1

Published

React bindings for a11y-feedback - accessible notifications and screen reader announcements

Readme

@theaccessibleteam/a11y-feedback-react

React bindings for a11y-feedback - the accessibility-first feedback library.

Installation

npm install @theaccessibleteam/a11y-feedback @theaccessibleteam/a11y-feedback-react

Quick Start

Option 1: Using the Hook (Simple)

import { useA11yFeedback } from '@theaccessibleteam/a11y-feedback-react'
import { configureFeedback } from '@theaccessibleteam/a11y-feedback'

// Configure once at app startup
configureFeedback({ visual: true })

function SaveButton() {
  const feedback = useA11yFeedback()

  const handleSave = async () => {
    feedback.loading('Saving...', { id: 'save' })

    try {
      await saveData()
      feedback.success('Saved!', { id: 'save' })
    } catch (e) {
      feedback.error('Failed to save', { id: 'save', focus: '#save-btn' })
    }
  }

  return <button id="save-btn" onClick={handleSave}>Save</button>
}

Option 2: Using the Provider (Recommended for Apps)

import { A11yFeedbackProvider, useA11yFeedbackContext } from '@theaccessibleteam/a11y-feedback-react'

function App() {
  return (
    <A11yFeedbackProvider config={{ visual: true }} debug>
      <MyApp />
    </A11yFeedbackProvider>
  )
}

function MyComponent() {
  const { success, error } = useA11yFeedbackContext()

  const handleAction = async () => {
    try {
      await performAction()
      success('Action completed!')
    } catch (e) {
      error('Action failed')
    }
  }

  return <button onClick={handleAction}>Do Something</button>
}

Hooks

useA11yFeedback()

Main hook providing all feedback methods. Can be used without a provider.

const { success, error, warning, info, loading, dismiss, dismissAll } = useA11yFeedback()

useA11yAnnounce()

Lightweight hook for screen reader announcements only.

const { announcePolite, announceAssertive } = useA11yAnnounce()

// Polite announcements wait for current speech to finish
announcePolite('Results updated')

// Assertive announcements interrupt immediately
announceAssertive('Error: Please fix the form')

useFeedbackConfig()

Hook for managing configuration reactively.

const { config, updateConfig, enableVisual, disableVisual } = useFeedbackConfig()

useA11yFeedbackContext()

Access the provider context. Must be used inside A11yFeedbackProvider.

const ctx = useA11yFeedbackContext()

API

A11yFeedbackProvider

| Prop | Type | Description | |------|------|-------------| | config | Partial<FeedbackConfig> | Configuration options | | debug | boolean | Enable debug mode | | children | ReactNode | Child components |

useA11yFeedback() Return

| Method | Description | |--------|-------------| | success(message, options?) | Send success notification | | error(message, options?) | Send error notification | | warning(message, options?) | Send warning notification | | info(message, options?) | Send info notification | | loading(message, options?) | Send loading notification | | dismiss(id) | Dismiss specific notification | | dismissAll() | Dismiss all notifications |

TypeScript

Full TypeScript support with exported types:

import type { 
  FeedbackType, 
  FeedbackOptions, 
  FeedbackEvent,
  FeedbackConfig 
} from '@theaccessibleteam/a11y-feedback-react'

License

MIT