All Projects → dequelabs → agnostic-axe

dequelabs / agnostic-axe

Licence: MIT license
Framework agnostic accessibility reporter, powered by axe-core

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to agnostic-axe

accessibility-resources
Screen reader and WCAG testing resources to maintain a consistent approach to testing and documenting behaviour.
Stars: ✭ 25 (-68.75%)
Mutual labels:  accessibility, a11y, a11y-testing
axe-playwright
♿: Custom commands for Playwright to run accessibility (a11y) checks with axe-core
Stars: ✭ 88 (+10%)
Mutual labels:  a11y, a11y-testing, axe-core
accessibility-testing-tools
A collection of useful tools for accessibility testing and debugging in the browser, online and desktop
Stars: ✭ 18 (-77.5%)
Mutual labels:  accessibility, a11y, a11y-testing
Tanaguru
Automated accessibility (a11y) testing tool, with emphasis on reliablity and automation
Stars: ✭ 116 (+45%)
Mutual labels:  accessibility, a11y, a11y-testing
buttonbuddy
Learn about accessible button contrast then generate your own accessible button color palette
Stars: ✭ 60 (-25%)
Mutual labels:  accessibility, a11y, a11y-testing
accessibility-ruleset-runner
eBay Accessibility Ruleset Runner automates 20% of WCAG 2.0 AA recommendations, saving time on manual testing.
Stars: ✭ 24 (-70%)
Mutual labels:  accessibility, a11y, a11y-testing
accessibility-resources
A curated list of accessibility resources
Stars: ✭ 66 (-17.5%)
Mutual labels:  accessibility, a11y, a11y-testing
Focusoverlay
Library for creating animated overlays on focused elements
Stars: ✭ 167 (+108.75%)
Mutual labels:  accessibility, a11y
Empathy Prompts
💡 Ideas to help consider Inclusive Design principles when making things for others to use.
Stars: ✭ 173 (+116.25%)
Mutual labels:  accessibility, a11y
Creatability Components
Web components for making creative tools more accessible.
Stars: ✭ 248 (+210%)
Mutual labels:  accessibility, a11y
A11y Css Reset
A small set of global rules to make things accessible and reset default styling
Stars: ✭ 250 (+212.5%)
Mutual labels:  accessibility, a11y
Visible
🦉 Accessibility testing framework at the next level
Stars: ✭ 164 (+105%)
Mutual labels:  accessibility, a11y
Houdini
A simple, accessible show-and-hide/accordion script.
Stars: ✭ 148 (+85%)
Mutual labels:  accessibility, a11y
vue-focus-loop
Vue component that helps you to to trap focus in an element.
Stars: ✭ 23 (-71.25%)
Mutual labels:  accessibility, a11y
Ebayui Core
Collection of Marko widgets; considered to be the core building blocks for all eBay components, pages & apps
Stars: ✭ 134 (+67.5%)
Mutual labels:  accessibility, a11y
Bootstrap Vue
BootstrapVue provides one of the most comprehensive implementations of Bootstrap v4 for Vue.js. With extensive and automated WAI-ARIA accessibility markup.
Stars: ✭ 13,603 (+16903.75%)
Mutual labels:  accessibility, a11y
Parvus
An accessible, open-source image lightbox with no dependencies.
Stars: ✭ 124 (+55%)
Mutual labels:  accessibility, a11y
Vue Announcer
A simple way with Vue to announce any useful information for screen readers.
Stars: ✭ 185 (+131.25%)
Mutual labels:  accessibility, a11y
Capable
Keep track of accessibility settings, leverage high contrast colors, and use scalable fonts to enable users with disabilities to use your app.
Stars: ✭ 189 (+136.25%)
Mutual labels:  accessibility, a11y
Asqatasun
Mirror of Asqatasun ---> we've moved to GITLAB https://gitlab.com/asqatasun/Asqatasun - Opensource web site analyser, used for web accessibility "a11y"
Stars: ✭ 217 (+171.25%)
Mutual labels:  accessibility, a11y

agnostic-axe

Developer tool that continously observes the DOM to detect accessibility issues. Its audits are powered by axe-core.

Screenshot of an opened website, with accessibility issues displayed in the browser console

Basic Usage

This is all you need to start reporting accessibility issues to the browser console:

import('https://unpkg.com/agnostic-axe@3').then(
  ({ AxeObserver, logViolations }) => {
    const MyAxeObserver = new AxeObserver(logViolations)
    MyAxeObserver.observe(document)
  }
)

To try agnostic-axe, paste the above code into the browser console on a site of your choosing.

When adding agnostic-axe to your project, be sure to only import it in your development environment. Else your application will use more resources than necessary. (Here's an example of how to do this with webpack)

API Details

AxeObserver constructor

Accepts one parameter:

  • violationsCallback (required). A function that is invoked with an array of violations, as reported by axe-core. To log violations to the console, simply pass the logViolations function exported by this module.

AxeObserver.observe

Accepts one parameter:

  • targetNode (required). A DOM node. AxeObserver audits this node, and continously monitors it for changes. If a change has been detected, AxeObserver audits the parts that have changed, and reports any new accessibility defects.

To observe multiple nodes, one can call the AxeObserver.observe method multiple times.

MyAxeObserver.observe(document.getElementById('react-main'))
MyAxeObserver.observe(document.getElementById('vue-header'))
MyAxeObserver.observe(document.getElementById('page-footer'))

AxeObserver.disconnect

Accepts no parameters.

Invoke this method to stop observing the DOM. This also clears the cache of violations that were already reported.

MyAxeObserver.disconnect()

Interacting with the axe-core API

The instance of axe-core used by agnostic-axe is exported by this module. Import it to interact with the axe-core API.

import('https://unpkg.com/agnostic-axe@3').then(
  ({ axeCoreInstance, AxeObserver, logViolations }) => {
    axeCoreInstance.registerPlugin(myPlugin)
    // ...
  }
)

Comparison with react-axe

Unlike framework specific implementations of axe-core, such as react-axe, agnostic-axe uses a MutationObserver to listen for changes directly in the DOM. This has two advantages:

  1. It works with all web frameworks, and with any of their versions. This is key, as for example, at the time of writing, react-axe does not work with the newer React features (function components and fragments), while agnostic-axe does supports them.
  2. It only runs audits if the actual DOM changes. This means it uses less resources than react-axe, which runs audits when components rerender, even if their output does not change.

agnostic-axe is optimized for performance. Its audits are small chunks of work that run in the browser's idle periods.

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].