All Projects → dequelabs → Axe Core

dequelabs / Axe Core

Licence: mpl-2.0
Accessibility engine for automated Web UI testing

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Axe Core

Reakit
Toolkit for building accessible rich web apps with React
Stars: ✭ 5,265 (+22.64%)
Mutual labels:  hacktoberfest, accessibility, a11y
DomainAccessibilityAudit
Web application to create domain and subdomain accessibility audits, with violation statistics.
Stars: ✭ 41 (-99.04%)
Mutual labels:  accessibility, a11y, axe
Nextsimplestarter
🐳 Simple and Accessible PWA boilerplate with Nextjs 10 + React Hooks
Stars: ✭ 744 (-82.67%)
Mutual labels:  hacktoberfest, accessibility, a11y
Udoit
The Universal Design Online content Inspection Tool, or UDOIT (pronounced, “You Do It”) enables faculty to identify accessibility issues in Canvas by Instructure. It will scan a course, generate a report, and provide resources on how to address common accessibility issues.
Stars: ✭ 80 (-98.14%)
Mutual labels:  hacktoberfest, accessibility, a11y
a11ymyths
a11ymyths.com
Stars: ✭ 26 (-99.39%)
Mutual labels:  accessibility, a11y
Parvus
An accessible, open-source image lightbox with no dependencies.
Stars: ✭ 248 (-94.22%)
Mutual labels:  accessibility, a11y
react-native-aria
A library of React Hooks for React-Native (Android/iOS/web) to provide accessible UI primitives for a design system.
Stars: ✭ 164 (-96.18%)
Mutual labels:  accessibility, a11y
Js Offcanvas
A lightweight, flexible jQuery off-canvas navigation plugin which lets you create fully accessible sidebar or top/bottom sliding (or push) panels with keyboard interactions and ARIA attributes.
Stars: ✭ 272 (-93.66%)
Mutual labels:  accessibility, a11y
Whocanuse
WhoCanUse is a tool that brings attention and understanding to how color contrast can affect different people with visual impairments.
Stars: ✭ 259 (-93.97%)
Mutual labels:  accessibility, a11y
Pa11y
Pa11y is your automated accessibility testing pal
Stars: ✭ 3,207 (-25.3%)
Mutual labels:  accessibility, a11y
Hint
💡 A hinting engine for the web
Stars: ✭ 3,280 (-23.6%)
Mutual labels:  hacktoberfest, a11y
van11y-accessible-hide-show-aria
ES2015 accessible hide-show system (collapsible regions), using ARIA
Stars: ✭ 34 (-99.21%)
Mutual labels:  accessibility, a11y
AccessSniff
Automated accessibility testing using HTML_Codesniffer (WCAG and Section508)
Stars: ✭ 84 (-98.04%)
Mutual labels:  accessibility, a11y
chaarts
Charts with HTML & CSS
Stars: ✭ 79 (-98.16%)
Mutual labels:  accessibility, a11y
bookworm
The Universally Accessible document Reader
Stars: ✭ 50 (-98.84%)
Mutual labels:  accessibility, a11y
Accessibility
A repo to organize the guidelines and best practices for accessibility at 18f.
Stars: ✭ 269 (-93.73%)
Mutual labels:  accessibility, a11y
Pa11y Ci
Pa11y CI is a CI-centric accessibility test runner, built using Pa11y
Stars: ✭ 291 (-93.22%)
Mutual labels:  accessibility, a11y
A11y Toggle
A tiny script for accessible content toggles.
Stars: ✭ 304 (-92.92%)
Mutual labels:  accessibility, a11y
A11yproject.com
The A11Y Project is a community-driven effort to make digital accessibility easier.
Stars: ✭ 3,436 (-19.96%)
Mutual labels:  accessibility, a11y
accessibility-cloud
👩🏽‍🦯🦮👩🏻‍🦽👩🏿‍🦼 the platform to exchange physical accessibility data in a standardized, future-proof, easy-to-use way.
Stars: ✭ 37 (-99.14%)
Mutual labels:  accessibility, a11y

axe-core

License Version Total npm downloads Commits GitHub contributors Join our Slack chat Package Quality

Axe is an accessibility testing engine for websites and other HTML-based user interfaces. It's fast, secure, lightweight, and was built to seamlessly integrate with any existing test environment so you can automate accessibility testing alongside your regular functional testing.

Sign up for axe news to get the latest on axe features, future releases, and events.

The Accessibility Rules

Axe-core has different types of rules, for WCAG 2.0 and 2.1 on level A and AA, as well as a number of best practices that help you identify common accessibility practices like ensuring every page has an h1 heading, and to help you avoid "gotchas" in ARIA like where an ARIA attribute you used will get ignored.

With axe-core, you can find on average 57% of WCAG issues automatically. Additionally, axe-core will return elements as "incomplete" where axe-core could not be certain, and manual review is needed.

To catch bugs earlier in the development cycle we recommend using the axe-linter vscode extension. To improve test coverage even further we recommend the intelligent guided tests in the axe Extension.

The complete list of rules, grouped WCAG level and best practice, can found in doc/rule-descriptions.md.

Getting started

First download the package:

npm install axe-core --save-dev

Now include the javascript file in each of your iframes in your fixtures or test systems:

<script src="node_modules/axe-core/axe.min.js"></script>

Now insert calls at each point in your tests where a new piece of UI becomes visible or exposed:

axe
  .run()
  .then(results => {
    if (results.violations.length) {
      throw new Error('Accessibility issues found');
    }
  })
  .catch(err => {
    console.error('Something bad happened:', err.message);
  });

Philosophy

The web can only become an accessible, inclusive space if developers are empowered to take responsibility for accessibility testing and accessible coding practices.

Automated accessibility testing is a huge timesaver, it doesn't require special expertise, and it allows teams to focus expert resources on the accessibility issues that really need them. Unfortunately, most accessibility tools are meant to be run on sites and applications that have reached the end of the development process and often don't give clear or consistent results, causing frustration and delays just when you thought your product was ready to ship.

Axe was built to reflect how web development actually works. It works with all modern browsers, tools, and testing environments a dev team might use. With axe, accessibility testing can be performed as part of your unit testing, integration testing, browser testing, and any other functional testing your team already performs on a day-to-day basis. Building accessibility testing into the early development process saves time, resources, and all kinds of frustration.

About axe - our Manifesto

  • Axe is open source.
  • It returns zero false positives (bugs notwithstanding).
  • It's designed to work on all modern browsers and with whatever tools, frameworks, libraries and environments you use today.
  • It's actively supported by Deque Systems, a major accessibility vendor.
  • It integrates with your existing functional/acceptance automated tests.
  • It automatically determines which rules to run based on the evaluation context.
  • Axe supports in-memory fixtures, static fixtures, integration tests and iframes of infinite depth.
  • Axe is highly configurable.

Supported Browsers

The axe-core API fully supports the following browsers:

  • Microsoft Edge v40 and above
  • Google Chrome v42 and above
  • Mozilla Firefox v38 and above
  • Apple Safari v7 and above
  • Internet Explorer v11

Support means that we will fix bugs and attempt to test each browser regularly. Only Firefox, Chrome, and Internet Explorer 11 are currently tested on every pull request.

There is limited support for JSDOM. We will attempt to make all rules compatible with JSDOM but where this is not possible, we recommend turning those rules off. Currently the color-contrast rule is known not to work with JSDOM.

We can only support environments where features are either natively supported or polyfilled correctly. We do not support the deprecated v0 Shadow DOM implementation.

Contents of the API Package

The axe-core API package consists of:

  • axe.js - the JavaScript file that should be included in your web site under test (API)
  • axe.min.js - a minified version of the above file

Localization

Axe can be built using your local language. To do so, a localization file must be added to the ./locales directory. This file must have be named in the following manner: <langcode>.json. To build axe using this locale, instead of the default, run axe with the --lang flag, like so:

grunt build --lang=nl

or equivalently:

npm run build -- --lang=nl

This will create a new build for axe, called axe.<lang>.js and axe.<lang>.min.js. If you want to build localized versions, simply pass in --all-lang instead. If you want to build multiple localized versions (but not all of them), you can pass in a comma-separated list of langages to the --lang flag, like --lang=nl,ja.

To create a new translation for axe, start by running grunt translate --lang=<langcode>. This will create a json file fin the ./locales directory, with the default English text in it for you to translate. We welcome any localization for axe-core. For details on how to contribute, see the Contributing section below. For details on the message syntax, see Check Message Template.

To update existing translation file, re-run grunt translate --lang=<langcode>. This will add new messages used in English and remove messages which were not used in English.

Additionally, locale can be applied at runtime by passing a locale object to axe.configure(). The locale object must be of the same shape as existing locales in the ./locales directory. For example:

axe.configure({
  locale: {
    lang: 'de',
    rules: {
      accesskeys: {
        help: 'Der Wert des accesskey-Attributes muss einzigartig sein.'
      }
      // ...
    },
    checks: {
      abstractrole: {
        fail: 'Abstrakte ARIA-Rollen dürfen nicht direkt verwendet werden.'
      },
      'aria-errormessage': {
        // Note: doT (https://github.com/olado/dot) templates are supported here.
        fail:
          'Der Wert der aria-errormessage ${data.values}` muss eine Technik verwenden, um die Message anzukündigen (z. B., aria-live, aria-describedby, role=alert, etc.).'
      }
      // ...
    }
  }
});

Supported Locales

Axe-core supports the following locales. Do note that since locales are contributed by our community, they are not guaranteed to include all translations needed in a release.

  • Basque
  • Danish
  • Dutch
  • French
  • German
  • Japanese
  • Korean
  • Polish
  • Portuguese (Brazilian)
  • Spanish

Updates & Security

Axe-core has a new minor release every 3 to 5 months, which usually introduces new rules and features. We recommend scheduling time to upgrade to these versions. Security updates will be made available for minor version lines up to 18 months old.

  • See release and support for details on the frequency of releases, long-term support and recommendations on upgrading axe-core.
  • See backward compatibility for details on the types of changes different releases may introduce.

Supported ARIA Roles and Attributes.

Refer axe-core ARIA support for a complete list of ARIA supported roles and attributes by axe.

Contributing

Read the Proposing Axe-core Rules guide

Read the documentation on the architecture

Read the documentation on contributing

Projects using axe-core

List of projects using axe-core

Acknowledgements

Thanks to Dulin Marat for his css-selector-parser implementation which is included for shadow DOM support.

Thanks to the Slick Parser implementers for their contribution, we have used some of their algorithms in our shadow DOM support code.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].