Giter Site home page Giter Site logo

axe-reporter-earl's Introduction

[DEPRECATED] Axe Reporter EARL

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/reporter-earl.


This project is a reporter for axe-core. When used as part of an axe-core run, it will produce results using the Evaluation And Reporting Language (EARL) 1.0. The reporter uses JSON-LD to serialise the RDF data.

Installation

To install Axe-reporter-earl, with NPM, run:

npm install axe-reporter-earl

Usage

The EARL reporter can be passed to axe, either as part of configuration or as part of the run:

import reporter from 'axe-reporter-earl'
// Define the reporter through axe.configure
axe.configure({ reporter })
axe.run().then(earlResults => console.log(earlResults))
import reporter from 'axe-reporter-earl'
// Use the reporter in a single axe.run call
axe.run({ reporter }).then(earlResults => console.log(earlResults))

Format

The repoter format should look something like this:

{
  "@context": {
    "@vocab": "http://www.w3.org/ns/earl#",
    "earl": "http://www.w3.org/ns/earl#",
    "WCAG20": "http://www.w3.org/TR/WCAG20/#",
    "WCAG21": "http://www.w3.org/TR/WCAG21/#",
    "auto-wcag": "https://auto-wcag.github.io/auto-wcag/rules/",
    "dct": "http://purl.org/dc/terms#",
    "sch": "https://schema.org/",
    "doap": "http://usefulinc.com/ns/doap#",
    "foaf": "http://xmlns.com/foaf/spec/#",
    "WebPage": "sch:WebPage",
    "url": "dct:source",
    "assertions": {
      "@reverse": "subject"
    },
    "assertedBy": {
      "@type": "@id"
    },
    "outcome": {
      "@type": "@id"
    },
    "mode": {
      "@type": "@id"
    },
    "pointer": {
      "@type": "ptr:CSSSelectorPointer"
    }
  },
  "@type": "WebPage",
  "url": "http://localhost/",
  "assertions": [
    {
      "assertedBy": {
        "@id": "https://github.com/dequelabs/axe-core/releases/tag/3.1.2",
        "@type": ["earl:Assertor", "earl:Software", "doap:Project"],
        "doap:name": "Axe",
        "doap:vendor": {
          "@id": "https://deque.com/",
          "@type": "foaf:Organization",
          "foaf:name": "Deque Systems"
        }
      },
      "test": {
        "@type": "TestCase",
        "@id": "https://dequeuniversity.com/rules/axe/3.1/foo"
      },
      "result": {
        "@type": "TestResult",
        "outcome": "earl:inapplicable"
      },
      "@type": "Assertion",
      "mode": "earl:automatic"
    },
    {
      "assertedBy": {
        "@id": "https://github.com/dequelabs/axe-core/releases/tag/3.1.2",
        "@type": ["earl:Assertor", "earl:Software", "doap:Project"],
        "doap:name": "Axe",
        "doap:vendor": {
          "@id": "https://deque.com/",
          "@type": "foaf:Organization",
          "foaf:name": "Deque Systems"
        }
      },
      "test": {
        "@type": "TestCase",
        "@id": "https://dequeuniversity.com/rules/axe/3.1/bar"
      },
      "result": {
        "@type": "TestResult",
        "info": "Ensures role attribute has an appropriate value for the element",
        "outcome": "earl:undefined",
        "pointer": "#foo"
      },
      "@type": "Assertion",
      "mode": "earl:automatic"
    }
  ]
}

axe-reporter-earl's People

Contributors

jeeyyy avatar stephenmathieson avatar wilcofiers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

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.