Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

accessibility-testing-utils

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

accessibility-testing-utils

Some utils to ease accessbility testing

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

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.

  • This will disable pointer events, forcing you to use tabs so you can test the labels, state, values etc with a VoiceOver just like a real person.
  • Credits http://udacity.github.io/ud891/lesson3-semantics-built-in/03-experience-screen-reader/
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()
  },[])

FAQs

Package last updated on 22 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc