GithubHelp home page GithubHelp logo

forsti0506 / a11y-sitechecker Goto Github PK

View Code? Open in Web Editor NEW
47.0 47.0 7.0 3.64 MB

Automatic accessibility checker with website crawling + screenshots for easy use

License: GNU Affero General Public License v3.0

JavaScript 3.12% TypeScript 96.76% Shell 0.12%
accessibility accessibility-criteria accessibility-testing axe crawler hacktoberfest open-source puppeteer typescript typescript-library

a11y-sitechecker's People

Contributors

actions-user avatar dependabot-preview[bot] avatar dependabot[bot] avatar forsti0506 avatar semantic-release-bot avatar tyler-ham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

a11y-sitechecker's Issues

DOMException is thrown when a data attribute contains dots

When a web page declares data attributes with dots the accessibility checker fails and throws an uncaught DOMException.

Example for such a data attribute:

<body data-keydown.tabguard="1" />

I looked around the code base and I think I've found the reason causing the exception:

a.substring(0, a.indexOf('.')) + "[class='" + a.substring(a.indexOf('.') + 1, a.length) + "']",

As I understand the above mentioned line of code correctly, everything after the dot and inclusive the dot is replaced with
class=[${everything-after-dot}]. The reason why the error happens at this point, is that in the following line, data attribute names are not escaped properly, which then results in invalid selectors:

aSel[0] = sSel += '[' + aDataAttr[j].name + '="' + aDataAttr[j].value + '"]';

This causes the above selector to be turned into

body[data-keydown[class='tabguard="1"]']

instead of an escaped version

body[data-keydown\\.tabguard="1"]

If desired, I am willing to provide a PR.

Request for a simple user guide for a novice user

Hi,

Is there any simple user guide for a blackbpox tester (who has limited to no coding knowledge but can follow the user guide to make the full use of the application) to use this to generate an accessibility report, please?

Could you help with this, please?

basic config file

Would love an example config file, with all defaults on. Just finding the config how to a little confusing.

I have tried


          File: config.json                           

{
 "name": "DRN1",
  "urlsToAnalyze": "google.com"
}


and get this error

############################################################################################# 
Start accessibility Test for GOOGLE 
############################################################################################# 
ProtocolError: Protocol error (Page.navigate): Cannot navigate to invalid URL 


The automated release is failing 🚨

🚨 The automated release from the main branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Cannot push to the Git repository.

semantic-release cannot push the version tag to the branch main on the remote Git repository with URL https://x-access-token:[secure]@github.com/forsti0506/a11y-sitechecker.git.

This can be caused by:


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Cannot find module after install package

Hi there,
I just install the package witch yarn and as a 2. try with npm. If I call the script with a11y-sitechecker https://www.test.at --config=config.json -T=1000 for example, I get this error.
What I have done wrong? What is missing? I hope you will help me

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/........./....../test-sitechecker/node_modules/a11y-sitechecker/bin/a11y-sitechecker_code' imported from /Users/JuliensMacBook/workspace/test-pov-sitechecker/node_modules/a11y-sitechecker/bin/a11y-sitechecker.js

Error on load.

I'm not sure why I would be getting this error when attempting to instal this.

$ a11y-sitechecker --config=config.json -T=1000
SyntaxError: Unexpected token e in JSON at position 0 
undefined:1
export interface Config {
^

SyntaxError: Unexpected token e in JSON at position 0
    at JSON.parse (<anonymous>)
    at setupConfig (/home/mike/a11y-sitechecker/node_modules/a11y-sitechecker/lib/utils/setup-config.js:40:35)
    at defaultFunction (/home/mike/a11y-sitechecker/node_modules/a11y-sitechecker/bin/a11y-sitechecker_code.js:22:51)
    at /home/mike/a11y-sitechecker/node_modules/a11y-sitechecker/bin/a11y-sitechecker.js:5:64
    at Object.<anonymous> (/home/mike/a11y-sitechecker/node_modules/a11y-sitechecker/bin/a11y-sitechecker.js:5:67)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)

devDependencies cannot be satisfied

I want to compile a11y-sitechecker from TypeScript to JavaScript and for that purpose tried to installed the devDependencies as listed in package.json. However, to my interpretation the required specific versions of packages pulled in as direct or indirect dependencies are in conflict and cannot be resolved:

$ npm install a11y-sitechecker '@axe-core/puppeteer@^4.4.0' 'chalk@^4.0.0' 'commander@^9.0.0' 'jsdom@^19.0.0' 'puppeteer@^13.3.2' 'rxjs@^7.5.4' 'uuid@^8.3.2' '@commitlint/cli@^16.2.1' '@commitlint/config-conventional@^16.2.1' '@semantic-release/changelog@^6.0.1' '@semantic-release/git@^10.0.1' '@semantic-release/github@^8.0.2' '@semantic-release/npm@^9.0.0' '@semantic-release/release-notes-generator@^10.0.3' '@types/jest@^27.4.0' '@types/jsdom@^16.2.14' '@types/node@^17.0.18' '@types/prettyjson@^0.0.30' '@types/puppeteer@^5.4.4' '@types/uuid@^8.3.4' '@typescript-eslint/eslint-plugin@^5.12.0' '@typescript-eslint/parser@^5.12.0' 'copyfiles@^2.4.1' 'eslint@^8.9.0' 'eslint-config-prettier@^8.3.0' 'eslint-config-standard@^16.0.3' 'eslint-plugin-import@^2.25.4' 'eslint-plugin-node@^11.1.0' 'eslint-plugin-prettier@^4.0.0' 'eslint-plugin-promise@^5.0.0' 'husky@^7.0.4' 'istanbul-badges-readme@^1.8.1' 'jest@^27.5.1' 'jest-puppeteer@^6.1.0' 'prettier@^2.5.1' 'semantic-release@^19.0.2' 'ts-jest@^27.1.3' 'ts-node@^10.5.0'
npm notice 
npm notice New minor version of npm available! 8.15.0 -> 8.19.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.19.1>
npm notice Run `npm install -g [email protected]` to update!
npm notice 
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: undefined@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   eslint@"^8.9.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^7.12.1" from [email protected]
npm ERR! node_modules/eslint-config-standard
npm ERR!   eslint-config-standard@"^16.0.3" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/ubuntu/.npm/eresolve-report.txt for a full report.

The command is execute as a RUN statement inside a Dockerfile extending image andrewmackrodt/nodejs-chromium.

The conflict is as follows:

Do I miss anything or is there a real problem to be fixed?

Question: -bash: a11y-sitechecker: command not found

Hello
Sorry, I'm a newbie with npm.
I pulled the code in this repo and run npm install and yarn add.
But when I wanted to run a11y-sitechecker through command line it throws me the following message:
-bash: a11y-sitechecker: command not found
Please advice.
Thanks,
M

DOMException: Failed to execute 'querySelector' on 'Document': '#1FDA5B64-3D65-493B-9C45-2B72F7A25B64' is not a valid selector.

I received the following error:

Error: Evaluation failed: DOMException: Failed to execute 'querySelector' on 'Document': '#1FDA5B64-3D65-493B-9C45-2B72F7A25B64' is not a valid selector.
    at __puppeteer_evaluation_script__:2:38

The cause appears to be a webpage containing a tabable element with an ID that starts with a number. See this Stack Overflow post: Using querySelector with IDs that are numbers.

The solution seems to be using a querySelector like [id='#1234'] instead of #1234 at lib/utils/mark-all-tabbale-items.ts:78.

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.