1.0.4 • Published 3 years ago

accessibility-testing-utils v1.0.4

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

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.

npm.io

Usage

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

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

2. Testing alt attribute in images.

npm.io

  • 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()
  },[])
1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago