Giter Club home page Giter Club logo

axe's People

Contributors

ameyakoshti avatar applejax avatar benmonro avatar darkowic avatar dwightjack avatar helen-dikareva avatar lpelypenko avatar sorin-davidoi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

axe's Issues

Generate Report Off React Selector Violations

Is it possible to generate a report highlighting the react selector specifically as the point at which an Axe violation happens?

Have tried using elementRef: true to check if this helps, but encountering issues related to an error as such:

1) with cannot return DOM elements. Use Selector functions for this purpose.

The code I'm using is as follows:

import { axeCheck } from '@testcafe-community/axe';
import { createHtmlReport } from 'axe-html-reporter';
import { Selector } from 'testcafe';

export const Accessibility = {

  scanPage: async(t, pageName) => {

    const context = { exclude: Selector('select') };
    const options = { rules: { 'document-title': { enabled: false } }, elementRef: true };
    // Run axe check, not using wrapper function that throws error
    const { error, results } = await axeCheck(t, context, options); // "context" and "options" parameters are optional

    console.log(`error: ${error}`);

    // "results" constant contains full axe Results object (https://www.deque.com/axe/core-documentation/api-documentation/#results-object)
    await t.expect(error).eql(null, `axe check failed with an error: ${error}`);
    
    createHtmlReport({
      results,
      options: {
        projectKey: `"${pageName}"`,
        outputDir: 'reports/artifacts/' + pageName
      }
    });
  }
}

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.