@qualweb/wcag-techniques
Advanced tools
Comparing version 0.0.0-develop-20231205163610 to 0.0.0-develop-20241204125016
{ | ||
"name": "@qualweb/wcag-techniques", | ||
"version": "0.0.0-develop-20231205163610", | ||
"version": "0.0.0-develop-20241204125016", | ||
"description": "Implementation of the WCAG 2.1 techniques", | ||
"main": "dist/wcag.bundle.js", | ||
"files": [ | ||
"dist/*" | ||
], | ||
"exports": { | ||
".": { | ||
"require": "./dist/__webpack/wcag.bundle.js", | ||
"types": "./dist/index.d.ts" | ||
}, | ||
"./lib/*": { | ||
"require": "./dist/lib/*" | ||
}, | ||
"./WcagTechniquesModule": { | ||
"require": "./dist/WcagTechniquesModule.js", | ||
"types": "./dist/WcagTechniquesModule.d.ts" | ||
} | ||
}, | ||
"scripts": { | ||
"tsc": "tsc", | ||
"test": "mocha test/**/*", | ||
"test": "mocha", | ||
"test:url": "mocha test/url.spec.mjs", | ||
@@ -17,9 +29,6 @@ "test:t17": "mocha test/techniques/QW-WCAG-T17.spec.mjs", | ||
"test:t34": "mocha test/techniques/QW-WCAG-T34.spec.mjs", | ||
"compile:techniques": "node compile-techniques.js", | ||
"lint": "eslint src --ext .ts", | ||
"lint:fix": "eslint src --ext .ts --fix", | ||
"test:t35": "mocha test/techniques/QW-WCAG-T35.spec.mjs", | ||
"lint": "eslint .", | ||
"format": "prettier src/**/*.ts --write", | ||
"prebuild": "npm run compile:techniques && rimraf prebuild && rimraf dist ", | ||
"build": "tsc --build && webpack --mode production", | ||
"postbuild": "rimraf prebuild", | ||
"build": "rimraf dist && tsc --build tsconfig.prod.json && webpack", | ||
"prepublishOnly": "npm run build" | ||
@@ -47,19 +56,19 @@ }, | ||
"devDependencies": { | ||
"@qualweb/dom": "0.2.8", | ||
"@qualweb/locale": "0.0.0-develop-20231205163610", | ||
"@qualweb/qw-page": "0.2.15", | ||
"@qualweb/types": "0.7.24", | ||
"@qualweb/util": "0.5.28", | ||
"@qualweb/core": "0.0.0-develop-20241204125016", | ||
"@qualweb/locale": "0.0.0-develop-20241204125016", | ||
"@qualweb/qw-page": "0.0.0-develop-20241204125016", | ||
"@qualweb/util": "0.0.0-develop-20241204125016", | ||
"@tsconfig/recommended": "^1.0.3", | ||
"@types/mocha": "^10.0.6", | ||
"@types/node": "^17.0.8", | ||
"chai": "^4.3.4", | ||
"eslint": "^8.53.0", | ||
"mocha": "^9.1.3", | ||
"prettier": "^3.1.0", | ||
"puppeteer": "^21.5.2", | ||
"chai": "4.5.0", | ||
"mocha": "^10.2.0", | ||
"prettier": "^3.1.1", | ||
"puppeteer": "^22.12.1", | ||
"rimraf": "^5.0.5", | ||
"typescript": "^4.5.4", | ||
"webpack": "^5.65.0", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.6.3", | ||
"webpack": "^5.89.0", | ||
"webpack-cli": "^4.9.1" | ||
} | ||
} |
@@ -7,4 +7,41 @@ # QualWeb WCAG techniques | ||
**This is an internal module of QualWeb. To use it check either [@qualweb/cli](https://github.com/qualweb/cli) or [@qualweb/core](https://github.com/qualweb/core). You can also perform evaluations at [http://qualweb.di.fc.ul.pt/evaluator/](http://qualweb.di.fc.ul.pt/evaluator/), or by installing the [chrome extension](https://chrome.google.com/webstore/detail/qualweb-extension/ljgilomdnehokancdcbkmbndkkiggioc).** | ||
This package is intended to be used with [@qualweb/core](https://github.com/qualweb/core). | ||
Add both packages to your project: | ||
```bash | ||
npm i --save @qualweb/core @qualweb/wcag-techniques | ||
``` | ||
In your own code, pass an instance of the `WCAGTechniques` class to QualWeb's evaluate method: | ||
```typescript | ||
import { WCAGTechniques } from '@qualweb/wcag-techniques'; | ||
import { QualWeb } from '@qualweb/core'; | ||
async function main() { | ||
const qw = new QualWeb(); | ||
await qw.start(); | ||
const bpInstance = new WCAGTechniques({ | ||
// Include/exclude specific rules here. Omitting any filters implies *all* | ||
// rules are included. | ||
levels: ['A', 'AA'], | ||
includes: ['QW-WCAG-T5'], | ||
}); | ||
const urlToEvaluate = 'https://www.google.com'; | ||
const report = await qw.evaluate({ | ||
url: urlToEvaluate, | ||
modules: [bpInstance], | ||
}); | ||
await qw.stop(); | ||
console.debug(report[urlToEvaluate].metadata); | ||
} | ||
``` | ||
## Implemented techniques | ||
@@ -11,0 +48,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
653239
130
3526
86