JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 16
  • Score
    100M100P100Q58810F
  • License ISC

Make non-button elements accessible in React

Package Exports

  • react-button-a11y

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-button-a11y) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-button-a11y

All Contributors

npm version npm downloads Build Status Coverage Status Maintainability

Make non-button elements accessible in React. This component applies the following to an element that wants to be a "button":

  • role="button"
  • tabIndex="0"
  • onKeyDown listener for enter and spacebar (like normal <button>s) that will trigger an onClick callback
  • enforced labelling via either aria-label or children

Contributors

Thanks goes to these wonderful people (emoji key):


Robert Pearce

💻 📖 💡 🤔 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!