Git Product home page Git Product logo

react-axe's Introduction

[DEPRECATED] react-axe

No Maintenance Intended

This repository has been deprecated. The package has been moved to axe-core-npm. The package will be available via NPM as @axe-core/react.


React-axe

Test your React application with the axe-core accessibility testing library. Results will show in the Chrome DevTools console.

Usage

Greenkeeper badge

Install the module from NPM or elsewhere

npm install --save-dev react-axe

Initialize the module

Call the exported function passing in the React and ReactDOM objects as well as a timing delay in milliseconds that will be observed between each component change and the time the analysis starts.

var React = require('react');
var ReactDOM = require('react-dom');

if (process.env.NODE_ENV !== 'production') {
  var axe = require('react-axe');
  axe(React, ReactDOM, 1000);
}

Be sure to only run the module in your development environment (as shown in the code above) or else your application will use more resources than necessary when in production. You can use envify to do this as is shown in the example.

Once initialized, the module will output accessibility defect information to the Chrome Devtools console every time a component updates.

Deduplicating

react-axe will deduplicate violations using the rule that raised the violation and the CSS selector and the failureSummary of the specific node. This will ensure that each unique issue will only be printed to the console once.

Debouncing

The third argument to the exported function is the number of milliseconds to wait for component updates to cease before performing an analysis of all the changes. The changes will be batched and analyzed from the closest common ancestor of all the components that changed within the batch. This generally leads to the first analysis for a dynamic application, analyzing the entire page (which is what you want), while subsequent updates will only analyze a portion of the page (which is probably also what you want).

Shadow DOM

With version 3.0.0, react-axe now runs accessibility tests inside of open Shadow DOM. You don't have to do anything special other than run react-axe on an component encapsulated with open Shadow DOM (as opposed to closed). For more information, see the axe-core repo.

Configuration

There is a fourth optional argument that is a configuration object for axe-core. Read about the object here: https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure

var config = {
  rules: [
    {
      id: 'skip-link',
      enabled: true
    }
  ]
};

axe(React, ReactDOM, 1000, config);

Axe-core's context object can be given as a fifth optional argument to specify which element should (and which should not) be tested. Read more from the Axe-core documentation: https://github.com/dequelabs/axe-core/blob/master/doc/API.md#context-parameter

var context = {
  include: [['#preview']]
};

axe(React, ReactDOM, 1000, undefined, context);

Run the example

Run a build in the example directory and start a server to see React-aXe in action in the Chrome Devtools console (opens on localhost:8888):

npm install
cd example
npm install
npm install -g http-server
npm start

Run the tests

Install dependencies in the root directory (which also installs them in the example directory) and then run the tests:

npm install
npm test

To debug tests in the Cypress application:

npm run test:debug

Compatibility

react-axe uses advanced console logging features and works best in the Chrome browser, with limited functionality in Safari and Firefox.

Advantages

I have been asked how this is different from modules like react-a11y which test the jsx.

The main difference is that react-axe tests the accessibility of the rendered DOM. This is important because many accessibility issues exist at the intersection of the DOM and the CSS and unless you have a fully rendered DOM, you will get two sorts of inaccuracies:

  1. False negatives because of lacking information. Example is in order to test color contrast you must know the foreground and background colors, and
  2. False positives because the element being evaluated is not in its final state and the information to communicate this to the testing algorithm is not available. Example is an inert piece of code that will be augmented once it becomes active.

If you have nice clean code, number 2 will be negligible but number 1 will always be a concern.

react-axe's People

Contributors

agreene-coursera avatar autosponge avatar badtant avatar chimericdream avatar dependabot-preview[bot] avatar dylanb avatar greenkeeper[bot] avatar j-kallunki avatar jeeyyy avatar jiabohou avatar junyper avatar katekourbatova avatar m4thieulavoie avatar marcysutton avatar stephenmathieson avatar straker avatar tom-drake avatar wilcofiers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-axe's Issues

Set sideEffects to help dead code elimination?

Given this ES modules code:

import React from 'react';
import ReactDOM from 'react-dom';
import axe from 'react-axe';

if (process.env.NODE_ENV !== 'production') {
  axe(React, ReactDOM, 1000);
}

ReactDOM.render(<div />, document.querySelector('#root'));

If the app is built in production mode, the react-axe package will not get stripped out from the bundle.

If this package defined sideEffects: false in its package.json, it would help webpack and Terser to dead code eliminate it.

This is needed in projects that don't make use of RequireJS imports, but only use standard ES modules imports.

How do I test this plugin?

I'm trying do some work on some server-rendered code, but it doesn't work because the plugin is trying to use the document object in the logElement method. I forked the repo to see if I can figure out how best to add support for server-rendered code, but without any tests I'm not sure how to validate my changes.

Should I just be running the example and hoping for the best?

Not possible to exclude nodes?

There appears to be no way to exclude nodes from being checked by react-axe. I'd like to be able to exclude a 3rd party div that I have no control over (hotjar in this case).

The include/exclude options are part of the context parameter that gets passed into the run method of axe-core but in react-axe changing that setting appears not to be possible.

Is there another way of achieving this or would a change in the library be needed?

Problem with lazy routes

Hi

I can't get react-axe working with React.lazy imports.

Here is my react-axe related code

if (process.env.NODE_ENV !== 'production') {
  // eslint-disable-next-line @typescript-eslint/no-var-requires
  const axe = require('react-axe');
  axe(React, ReactDOM, 5000); // big delay here because I want it to check a11y after lazy load
}

and here is my Routes' related code

import React from 'react';
import { Route, Switch } from 'react-router';

const Home = React.lazy(() => import(/* webpackChunkName: "Home" */ './Home'));
const NotFound = React.lazy(() =>
  import(/* webpackChunkName: "NotFound" */ './NotFound'),
);

const LoadingComponent = () => <div>Loading...</div>;

const Routes = (): JSX.Element => (
  <React.Suspense fallback={<LoadingComponent />}>
    <Switch>
      <Route exact path='/' component={Home} />
      <Route component={NotFound} />
    </Switch>
  </React.Suspense>
);

export default Routes;

When I reload the page, it works correctly, but after following a Link it throws an error Invariant Violation: Unable to find node on an unmounted component

I thought it was a React-Router related error, but after removing axe it works just fine.

Any help ?

Versions :

Thanks

React-axe does not use axe-core API options

This library doesn't take the axe-core API into account at all. It calls axe.run and doesn't pass any options other than reporter: 'v2', so even if the user specifies tags or resultTypes it doesn't do anything with them. I don't see why we couldn't change that, though.

It should be pretty simple to merge the user options with the reporter, unless there's some scenario I'm not thinking of yet. https://github.com/dequelabs/react-axe/blob/develop/index.js#L123

Provide an option to configure the colors

In #100, it was pointed out that the contrast is too low on the light theme. Changing this will introduce issues in the dark theme. The only real solution here is to make this configurable. Given that the same project will run on different machines, we should think if there's a way to:

  1. Make this configurable in the code base, to establish a default
  2. Allow someone to customise this on their machine in a way that is persistent. Maybe by having a method that someone can call that saves a preference in local storage?

Force test failures

Could this be modified to print the failure then cause a fatal exception? At this point, most of the examples I've seen for adding axe to automated testing require a lot of manual work, but if react-axe could be (optionally) configured to fail with a useful error in test environments, it would go a long way toward catching a11y errors automatically.

React Axe error with Material UI Select

React Axe produces the following error

axe.js:3139 Uncaught (in promise) Error: No elements found for include in page Context at validateContext (axe.js:3139) at new Context (axe.js:3182) at Object.runRules [as _runRules] (axe.js:4012) at Object.axe.run (axe.js:4200) at requestIdleCallback.timeout (index.js:131) at runTasks (index.js:138)

When a Material UI Select dropdown is opened and then closed. I believe this has to do with the React Portal that Material UI opens, and the fact that it is hidden for a brief time before the element is removed.

Demo: https://codesandbox.io/s/elastic-fast-hvo5d
(Note, in this demo the code sits within an iFrame. However the issue also occurs within our code which is outside of an iFrame)

An in-range update of lint-staged is breaking the build 🚨

The devDependency lint-staged was updated from 8.1.5 to 8.1.6.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

lint-staged is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: dependencies: Your tests failed on CircleCI (Details).

Release Notes for v8.1.6

8.1.6 (2019-05-03)

Bug Fixes

Commits

The new version differs by 2 commits.

  • 0984524 fix: update yup to 0.27.0 (#607)
  • e0c8aff chore: fix typo in package.json (#603)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

react-axe no longer works with React 16+

With React 16+, while react-axe still seems to execute following timeout on page load, the hooks to check accessibility after componentDidMount or componentDidUpdate no longer seem to execute.

Adding breakpoint at:

if (reactEl._owner && reactEl._owner._instance) {
shows that reactEl._owner._instance does not exist.

"Too much recursion" and slowdown in Firefox.

I previously logged the same issue which I promptly closed after seeing that react-axe is only really supported in Chrome. However this issue is now starting to prevent me from using react-axe in some projects.

In some cases I get the following in Firefox browser (latest Windows version):
image

It also then severely degrades performance when the dev tools is open.

Before resorting to nasty browser detection things, is there a known way to stop this from happening?

Would really love to use this everywhere because it is awesome!

React-Axe with React Native

Is react-axe compatible with react native? Or does anyone know a way to make it work with react native application?

[WIP]Console logs are not WCAG contrast compliant

This may seem petty, but I think there's a good case for "practice what you preach".

Moderate warnings: #ffa500

Contrast ratio of 1.97 on white background — fails all compliance tests.

Suggested change:
Chrome uses #5c3c00 as dark text on a #fffbe5 yellow background, which is AAA compliant.

Screen Shot 2019-07-16 at 4 27 41 PM

In other places they use a similar gold color on a white background:

Screen Shot 2019-07-16 at 4 26 49 PM

Severe warnings: #ff0000

Contrast ratio of 4.0 on white background — only AA compliant at large sizes. This one isn't as egregious as the warnings.

Suggested change:
Chrome uses #c51916 for red text, which is AAA compliant. They also use #ff0000 for error logs in some places, so ¯_(ツ)_/¯

Run tests on the entire DOM. Not only the react part?

Hi,

I'm trying out react-axe which seems quite nice. Though I'm not getting some if the errors I expect.
For example "Ensures every HTML document has a lang attribute". I'm getting it through the axe chrome plugin and also if I'm running axe-core with the following:

var axe = require("axe-core/axe.js");

axe.a11yCheck(document, function (results) {
console.log(results.violations);
});

Is it possible to get it also with react-axe? I guess maybe not since react is only handling a part of the DOM and not html and head for example...

expose console output results

Hi,

First off, thanks for putting together this nice utility 👍.

Regarding my issue; In my work environment we pipe various production logs/messages to a back-end service and consequently I was hoping you would be open to a PR that provides an option (via the axe configuration) of returning any messages to a handler as opposed to directly outputting the results to the browser console?

Let me know what you think.

Thanks!

edit => never mind, seems like in your api there is an option to intercept outputs. I'll toy around with that and re-open this issue should I be unable to use it as I think I may be able to.

aria-labelledby is present, but still erroring and now aria attribute not used correctly

Hi,
I've got a form that I'm trying to attach aria-labelledby to. The error was fixed, but react-axe is still calling an error. I'm also getting the new error that ARIA attributes should be used correctly. I'm guessing it has to do with the hyphen being used in the aria-labelledby. Maybe inconsistent space/kebab space usage? Not ideal, but I didn't think it was rule breaking.

screen shot 2018-05-08 at 5 45 42 pm

I might be making a mistake, but I don't see it. So I thought I'd share it.

Best,
Mike

PS if you can make this title better, please do!

Question about this vs. react-a11y

Hello,
Thanks for putting this out. I imagine you're aware of react-a11y and I was hoping you could discuss how react-axe is different from react-a11y and why someone would use one over the other.

I also think this information would be fantastic to add to the Readme.

Thanks!

Error link is broken

The console error's link to further information points to 3.3 instead of 3.2, which leads to a "Page not found".

Example link: https://dequeuniversity.com/rules/axe/3.3/bypass?application=axeAPI

Using JS with aria-describedby

Hey, I'm currently seeing the below error:

critical: ARIA attributes must conform to valid values https://dequeuniversity.com/rules/axe/3.2/aria-valid-attr-value?application=axeAPI

It didn't specify which element was causing the problem so after process of elimination I found out the issue was involving how I was using aria-describedby on my input fields.

Next to the input field, I have a div with text that I'd like to reference using aria-describedby. On the div, I set id={id + 'HelpText'}. On the input field, I set aria-describedby={id + 'HelpText'}. I confirmed in the dom that these values match.

So i'm curious if react-axe is simply running before the js resolves here, which would explain why there are no elements under the error in the console. Please let me know!

EvalError: Refused to evaluate a string as JavaScript

React-axe doesn't work when loaded in a page with strict content security policies (e.g. it throws EvalError if e.g. script-src 'self')

Link to live demo: https://github.com/lhorie/axe-csp-bug

react-axe version: 3.0.2
axe-core version: 3.0.0

One workaround is to disable CSP rules in development, but ideally, CSP rules should be the same in dev and prod to avoid crashes if an unrelated package also abuses eval-like constructs

Here's where the code throws:

// node_modules/axe-core/axe.js:1755
  'use strict';
  axe.imports['doT'] = function(module, exports, define, require, process) {
    var global = Function('return this')(); // <---

I assumed it had something to do with this: https://github.com/dequelabs/axe-core/blob/ae2e09377cadb0c3229c8cc33497d8a81bf828d2/Gruntfile.js#L154

The react-axe package does not explicitly depend on doT

I also found other instances, e.g.

// node_modules/axe-core/axe.js:243
metadata.messages[prop] = new Function('return ' + metadata.messages[prop] + ';')();

which presumably comes from https://github.com/dequelabs/axe-core/blob/6bfff2b9d2d7b7868df5fd7fe026d284a96787fb/lib/core/base/audit.js#L306

This issue is a dupe of dequelabs/axe-core#1158 filed here at the request of @WilcoFiers

An in-range update of eslint is breaking the build 🚨

The devDependency eslint was updated from 5.13.0 to 5.14.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: dependencies: Your tests passed on CircleCI! (Details).
  • ci/circleci: test: Your tests failed on CircleCI (Details).

Release Notes for v5.14.0
  • 85a04b3 Fix: adds conditional for separateRequires in one-var (fixes #10179) (#10980) (Scott Stern)
  • 0c02932 Upgrade: [email protected] (#11401) (Ilya Volodin)
  • 104ae88 Docs: Update governance doc with reviewers status (#11399) (Nicholas C. Zakas)
  • ab8ac6a Fix: Support boundary spread elements in sort-keys (#11158) (Jakub Rożek)
  • a23d197 New: add allowSingleLineBlocks opt. to padded-blocks rule (fixes #7145) (#11243) (richie3366)
  • e25e7aa Fix: comma-spacing ignore comma before closing paren (fixes #11295) (#11374) (Pig Fang)
  • a1f7c44 Docs: fix space-before-blocks correct code for "classes": "never" (#11391) (PoziWorld)
  • 14f58a2 Docs: fix grammar in object-curly-spacing docs (#11389) (PoziWorld)
  • d3e9a27 Docs: fix grammar in “those who says” (#11390) (PoziWorld)
  • ea8e804 Docs: Add note about support for object spread (fixes #11136) (#11395) (Steven Thomas)
  • 95aa3fd Docs: Update README team and sponsors (ESLint Jenkins)
  • 51c4972 Update: Behavior of --init (fixes #11105) (#11332) (Nicholas C. Zakas)
  • ad7a380 Docs: Update README team and sponsors (ESLint Jenkins)
  • 550de1e Update: use default keyword in JSON schema (fixes #9929) (#11288) (Pig Fang)
  • 983c520 Update: Use 'readonly' and 'writable' for globals (fixes #11359) (#11384) (Nicholas C. Zakas)
  • f1d3a7e Upgrade: some deps (fixes #11372) (#11373) (薛定谔的猫)
  • 3e0c417 Docs: Fix grammar in “there’s nothing prevent you” (#11385) (PoziWorld)
  • de988bc Docs: Fix grammar: Spacing improve -> Spacing improves (#11386) (PoziWorld)
  • 1309dfd Revert "Build: fix test failure on Node 11 (#11100)" (#11375) (薛定谔的猫)
  • 1e56897 Docs: “the function actually use”: use -> uses (#11380) (PoziWorld)
  • 5a71bc9 Docs: Update README team and sponsors (ESLint Jenkins)
  • 82a58ce Docs: Update README team and sponsors (ESLint Jenkins)
  • 546d355 Docs: Update README with latest sponsors/team data (#11378) (Nicholas C. Zakas)
  • c0df9fe Docs: ... is not an operator (#11232) (Felix Kling)
  • 7ecfdef Docs: update typescript parser (refs #11368) (#11369) (薛定谔的猫)
  • 3c90dd7 Update: remove prefer-spread autofix (fixes #11330) (#11365) (薛定谔的猫)
  • 5eb3121 Update: add fixer for prefer-destructuring (fixes #11151) (#11301) (golopot)
  • 173eb38 Docs: Clarify ecmaVersion doesn't imply globals (refs #9812) (#11364) (Keith Maxwell)
  • 84ce72f Fix: Remove extraneous linefeeds in one-var fixer (fixes #10741) (#10955) (st-sloth)
  • 389362a Docs: clarify motivation for no-prototype-builtins (#11356) (Teddy Katz)
  • 533d240 Update: no-shadow-restricted-names lets unassigned vars shadow undefined (#11341) (Teddy Katz)
  • d0e823a Update: Make --init run js config files through linter (fixes #9947) (#11337) (Brian Kurek)
  • 92fc2f4 Fix: CircularJSON dependency warning (fixes #11052) (#11314) (Terry)
  • 4dd19a3 Docs: mention 'prefer-spread' in docs of 'no-useless-call' (#11348) (Klaus Meinhardt)
  • 4fd83d5 Docs: fix a misleading example in one-var (#11350) (薛定谔的猫)
  • 9441ce7 Chore: update incorrect tests to fix build failing (#11354) (薛定谔的猫)
Commits

The new version differs by 38 commits.

  • af9688b 5.14.0
  • 0ce3ac7 Build: changelog update for 5.14.0
  • 85a04b3 Fix: adds conditional for separateRequires in one-var (fixes #10179) (#10980)
  • 0c02932 Upgrade: [email protected] (#11401)
  • 104ae88 Docs: Update governance doc with reviewers status (#11399)
  • ab8ac6a Fix: Support boundary spread elements in sort-keys (#11158)
  • a23d197 New: add allowSingleLineBlocks opt. to padded-blocks rule (fixes #7145) (#11243)
  • e25e7aa Fix: comma-spacing ignore comma before closing paren (fixes #11295) (#11374)
  • a1f7c44 Docs: fix space-before-blocks correct code for "classes": "never" (#11391)
  • 14f58a2 Docs: fix grammar in object-curly-spacing docs (#11389)
  • d3e9a27 Docs: fix grammar in “those who says” (#11390)
  • ea8e804 Docs: Add note about support for object spread (fixes #11136) (#11395)
  • 95aa3fd Docs: Update README team and sponsors
  • 51c4972 Update: Behavior of --init (fixes #11105) (#11332)
  • ad7a380 Docs: Update README team and sponsors

There are 38 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

I have a react component that updates frequently and it seems to put after.js into an infinite loop

I have a react component that frequently updates when you mouseover a date region, it's similar to the contributions view of github:

screen shot 2017-08-17 at 5 21 52 pm

For some reason when react-axe is active and I mouseover it and move my mouse it seems to get into an infinite loop in the after.js on the originalFn.apply line.


var after = function after(host, name, cb) {
	var originalFn = host[name];
	var restoreFn = undefined;

	if (originalFn) {
		host[name] = function () {
			originalFn.apply(this, arguments);
			cb(host);
		};
		restoreFn = function () {
			return host[name] = originalFn;
		};
	} else {
		host[name] = function () {
			cb(host);
		};
		restoreFn = function () {
			return delete host[name];
		};
	}

	restoreFunctions.push(restoreFn);
};

after.restorePatchedMethods = function () {
	restoreFunctions.forEach(function (restoreFn) {
		return restoreFn();
	});
	restoreFunctions = [];
};

module.exports = after;
Uncaught RangeError: Maximum call stack size exceeded
    at DataBar.host.(anonymous function) (http://localhost:3000/js/vendor_bundled_22229635cd1f11a8b467.js?826970b10a47f95bba4e:110279:25)
    at DataBar.h

Can I somehow disable react-axe just for this component with the configuration options? Failing that, any other ideas?

Warnings when used with React.StrictMode

I'm encountering issues when adding react-axe into a project that has React.StrictMode within it's component tree. The error in particular is:

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Provider which renders StrictMode children. Instead, add a ref directly to the element you want to reference.

Regarding usage of findDOMNode:
https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage

I noticed that some preliminary work had begun around this issue in #82 but I didn't see any open issues, and decided to make this one.

feature request: add support for runOnly

Currently react-axe does not allow you to configure the run command, only axe.configure. axe.configure does not support runOnly.

I currently have this code

reactAxe(React, ReactDOM, 1000, {
      rules: AxeCore.getRules(['wcag2aa', 'wcag2a']).map(rule => ({...rule, id: rule.ruleId, enabled: true})),
      disableOtherRules: true
    });

but I think the following would be preferable.

reactAxe(React, ReactDOM, 1000, {
      runOnly: ['wcag2aa', 'wcag2a']
    });

React 16+ componentDidUpdate checkNode method does not execute when component updates

Using React 16+, the componentDidUpdate checkNode method does not seem to get added to the component. This can be demonstrated in the example app, where color contrast warnings are not logged to the console when an item is selected.

Here's one possible workaround I came up with:

function addComponent(component) {
	var reactInstance = component._reactInternalInstance;
	if (reactInstance) {
		if(!components[reactInstance._debugID]) {
			components[reactInstance._debugID] = component;
			componentAfterRender(component);
		}
		if (!component.componentDidMount) {
			after(component, 'componentDidMount', checkNode);
		} else if (!component.componentDidUpdate) {
			after(component, 'componentDidUpdate', checkNode);
		}
	}
}

An in-range update of axe-core is breaking the build 🚨

Version 3.1.0 of axe-core was just published.

Branch Build failing 🚨
Dependency axe-core
Current Version 3.0.3
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

axe-core is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 18 commits.

  • 773e6dc Release v3.1.0 (#1102)
  • c6e5e08 Merge branch 'develop'
  • 0123cfd Merge branch 'develop'
  • 7f9d308 Merge branch 'develop'
  • 80bad67 Merge branch 'develop' for axe 3.0
  • df8a6e0 Merge branch 'develop'
  • fae9ab2 Merge branch 'develop'
  • ae4aa7f Merge remote-tracking branch 'origin/develop'
  • 604907d chore: merge develop into master for 3.0.0-alpha.9
  • 009fb35 chore: Merge v3.0.0-alpha.8
  • c6963cd chore: bump version to 3.0.0-alpha.5
  • c48bfae Merge remote-tracking branch 'origin/develop'
  • c4b231d Merge remote-tracking branch 'origin/develop'
  • 4177417 chore: merge 3.0.0-alpha.3 to master
  • 2de8b64 Merge pull request #483 from brennanpayne/patch-1

There are 18 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Error: Expect axe._selectorData to be set up

I intermittently get the following error with react-axe:

axe.js:5500 Uncaught (in promise) Error: Expect axe._selectorData to be set up at generateSelector (axe.js:5500) at Object.createUniqueSelector [as getSelector] (axe.js:5556) at DqElement.get selector [as selector] (axe.js:4909) at axe.js:4340 at Array.map (<anonymous>) at axe.js:4333 at Array.map (<anonymous>) at axe.js:4330 at Array.forEach (<anonymous>) at Object../node_modules/axe-core/axe.js.helpers.processAggregate (axe.js:4322)

It tends to happen when I have a lot of component updates happening.

using axe-core 3.3.2, react-axe 3.3.0
implementing as follows in root of my application:

if (process.env.NODE_ENV !== 'production') { const axe = require('react-axe'); axe(React, ReactDOM, 1000); }

I saw a fix had previously been added to solve this: #32

An in-range update of eslint-plugin-import is breaking the build 🚨

The devDependency eslint-plugin-import was updated from 2.17.3 to 2.18.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-import is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: dependencies: Your tests passed on CircleCI! (Details).
  • ci/circleci: test: Your tests failed on CircleCI (Details).

Commits

The new version differs by 26 commits.

  • c924f5d Bump to v2.18.0
  • c8132f2 Merge pull request #1393 from sheepsteak/eslint-6
  • 7e41d29 Make testVersion take a function to delay running require.resolve
  • d7023f6 Remove ESLint 6 from allowed failures in Travis
  • 3bee716 Use eslint@6 instead of [email protected] in Travis
  • d9b7258 Only run tests using typescript-eslint-parser on eslint@<6
  • c2b19d0 Update to @typescript-eslint/parser canary
  • 2f1f4da Allow ESLint@6
  • e6ea127 Use require.resolve when passing parser to RuleTester
  • 1029b4f Add ecmaVersion when required
  • b5ff64e Transform output of FileEnumerator into what rule expects
  • fc65509 Merge pull request #1389 from fooloomanzoo/patch-1
  • 4140870 Update no-named-as-default-member.md
  • 58b41c2 Merge pull request #1383 from golopot/node-12
  • 8974346 [Build] make node 12 pass CI

There are 26 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Release with axe-core 3.3.1

Hi,

Is it possible to make a release with axe-core dep as 3.3.1?
Would be nice with the new tests.

Thanks

An in-range update of husky is breaking the build 🚨

The devDependency husky was updated from 2.4.1 to 2.5.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

husky is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: dependencies: Your tests passed on CircleCI! (Details).
  • ci/circleci: test: Your tests failed on CircleCI (Details).

Commits

The new version differs by 15 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Question: My project based on static(single server-side) rendering.

Is it strict requirement to add DOMContentLoaded event listener?

My app uses react-static build tool for static rendering. It has dev mode similar with create-react-app, with HMR.

I'm using eslint with a11y plugin, and wanted to try your tool, but I'm not sure if I want to bundle your tool with everything else in production.

"Too much recursion" in firefox.

When running react-axe on a relatively large page of React components, Firefox starts reporting Too much recursion with every check.

It works fine in Chrome. And when I switch off react-axe I no longer get the issues in Firefox.

It seems to fail on the following line of the function after:

originalFn.apply(this, arguments);

Before diving deeper to see if I can find out why I am wondering if this has been seen before with react-axe ?

Should maybe add that it is a Redux application.

react-axe 3.0.0-alpha.1 + axe 3.0.0-beta.2 errors

I was running react-axe 3.0.0-alpha.1 which originally included axe 3.0.0-beta.1 as a dependency. I did a fresh install on a project today and see that the product is now throwing nothing but errors to the console. I looked and the only major difference I can find is that the axe dependency is now 3.0.0-beta.2.

The error I'm getting is

undefined
axe.js?3204:2647 Uncaught (in promise) TypeError: Cannot read property 'actualNode' of undefined
    at _loop (axe.js?3204:2647)
    at Object.axe.utils.getSelectorData (axe.js?3204:2687)
    at generateSelector (axe.js?3204:2792)
    at Object.createUniqueSelector [as getSelector] (axe.js?3204:2848)
    at DqElement.get selector [as selector] (axe.js?3204:2256)
    at eval (axe.js?3204:1228)
    at Array.map (<anonymous>)
    at eval (axe.js?3204:1221)
    at Array.map (<anonymous>)
    at eval (axe.js?3204:1218)

It will not produce any valid responses in the console and nothing has changed between the two copies of my project (one working with beta.1 and one not working with beta.2)

An in-range update of react is breaking the build 🚨

Version 16.4.2 of the react packages was just published.

Branch Build failing 🚨
Monorepo release group react
Current Version 16.4.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

This monorepo update includes releases of one or more dependencies which all belong to the react group definition.

react is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Release Notes v16.4.2

16.4.2 (August 1, 2018)

React DOM Server

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Release v3.1.0

It's been awhile since we've released. Once #65 lands, we should push a v3.1.0 version to npm.

An in-range update of eslint-plugin-react is breaking the build 🚨

The devDependency eslint-plugin-react was updated from 7.12.4 to 7.13.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-react is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: dependencies: Your tests failed on CircleCI (Details).

Commits

The new version differs by 74 commits.

  • f39829f Update CHANGELOG and bump version
  • 9e81dde [Deps] update jsx-ast-utils, resolve
  • e73a692 Merge pull request #2256 from mateuszsokola/master
  • b5fc9bf [fix] jsx-props-no-multi-spaces: support generic components (ts)
  • 8bd3837 Fix Node 4 compatibility
  • 005dad3 Revert "Replace mocha by jest"
  • 6e4f43e Replace mocha by jest
  • 09f580c Replace typescript-eslint-parser by @typescript-eslint/parser
  • 861fdef [fix] prop-types: fix case with destructuring and defualt param
  • 9fbd037 Fix ESLint 6 compat by providing parser as absolute path to RuleTester
  • 8041075 Fix jsx-curly-brace-presence schema defaults
  • 9cec705 Add next ESLint version to Travis
  • 0d4725e Add Node 12 and remove Node 4/6 from Travis
  • 9192ec3 Update devDependencies
  • d5d2e82 Merge pull request #2250 from guliashvili/master

There are 74 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

input field in iframe stop responding to user interaction on iOS Safari

react-axe has some kind interference of user interaction on iOS Safari. input field in iframe can't be focus reliably.

Steps to reproduce:

  1. With the react-axe enabled and a iframe with input fields presented on the page.
  2. Tap the input field in the iframe, it works fine.
  3. Tap done of the onscreen keyboard to the hide the keyboard.
  4. Tap anything outside of the iframe.
  5. Tap the input field in the iframe. The input field will no longer be able to get focus.

The last step might be intermitent. If you keep trying, eventually after 2 or 3 tires it might start working again.

We have tried on several iOS devices, iPhone 6, iPad, iPad Air. They all produce the same issue.

iOS version: 12.3.1
react-axe: 3.2.0
react: 16.9.0
react-dom: 16.9.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.