accessibility-testing-utils

1.0.4 • Public • Published

Accessibility testing utils

Installation

yarn add accessibility-testing-utils
OR
npm install accessibility-testing-utils

1. Blur the site to test tab navigation and accessibility role/label/state.

Usage

import {blurElementStyle} from "accessibility-testing-utils"

<div style={blurElementStyle}>{children}</div>

2. Testing alt attribute in images.

  • This will make src of all the images an invalid string.
  • Even though tools like Lighthouse makes sure image has a valid alt attribute, but it's better to test it manually.
  • Watch this to know why this is important.

Usage

import { testImageAltAttribute } from 'accessibility-testing-utils';

 React.useEffect(()=>{
    testImageAltAttribute()
  },[])

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i accessibility-testing-utils

      Weekly Downloads

      0

      Version

      1.0.4

      License

      MIT

      Unpacked Size

      382 kB

      Total Files

      5

      Last publish

      Collaborators

      • nishanbende