0.0.8 • Published 4 years ago

@rubennic/guidedog v0.0.8

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

Guide Dog

This is only a prototype.

It will not work as intended!

Here be dragons.

Beware of Dog.

Guide Dog is an experiment in regression testing for accessability.

It currently only works with React components, which can then be "snapshotted" with jest to tell when element changes produce accessability changes.

Guide Dog can produce:

  • Accessability tree
  • Tabable elements tree
  • Landmarks tree

Usage:

yarn add --dev @rubennic/guidedog

In your jest file:

import { guideDog, GuideDogFilter } from '@rubennic/guidedog';

test('guideDog test', async () => {
  const accessibilityTree = await guideDog(<TestComp/>);
  expect(accessibilityTree).toMatchSnapshot();

  const tabableTree = await guideDog(<TestComp/>, {
    filterType: GuideDogFilter.OnlyTabableElements,
  });
  expect(tabableTree).toMatchSnapshot();

  const landmarksTree = await guideDog(<TestComp/>, {
    filterType: GuideDogFilter.OnlyLandmarks,
  });
  expect(landmarksTree).toMatchSnapshot();
});

A few of it's current limitations:

  1. Super slow. This is due to using puppeteer to generate accessability trees.
  2. Invalid snapshots do not link back to offending react components.

I'm working on ideas for all of the above problems.

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago