# @rubennic/guidedog

> Guide Dog is an experiment in regression testing for accessability.

Latest version **0.0.8** (published 2019-11-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rubennic/guidedog
pnpm add @rubennic/guidedog
yarn add @rubennic/guidedog
bun add @rubennic/guidedog
```

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2019-11-26 |
| First published | 2019-08-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 17.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Ruben Niculcea |
| Maintainers | rubennic |

## Links

- npm: https://www.npmjs.com/package/@rubennic/guidedog
- Repository: https://github.com/RubenSandwich/guidedog
- Homepage: https://github.com/RubenSandwich/guidedog#readme
- Issues: https://github.com/RubenSandwich/guidedog/issues
- npm.io page: https://npm.io/package/@rubennic/guidedog

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^16.9.0
- [puppeteer](https://npm.io/package/puppeteer.md) git+https://github.com/RubenSandwich/puppeteer.git#master
- [react-dom](https://npm.io/package/react-dom.md) ^16.9.0

## Recent versions

- 0.0.8 (latest) — 2019-11-26
- 0.0.7 — 2019-11-26
- 0.0.6 — 2019-08-30
- 0.0.5 — 2019-08-29
- 0.0.4 — 2019-08-26
- 0.0.3 — 2019-08-26
- 0.0.2 — 2019-08-26
- 0.0.1 — 2019-08-26

## README

# 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:
```bash
yarn add --dev @rubennic/guidedog
```

In your jest file:
```jsx
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.

---
_Source: https://npm.io/package/@rubennic/guidedog · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
