Giter Club home page Giter Club logo

purple-hats's Introduction

#purple-hats

purple-hats is a customisable, automated accessibility testing tool that allows software development teams to assess whether their products are user-friendly to persons with disabilities (PWDs).

Technology Stack

  1. Apify (Puppeteer)
  2. Axe-core
  3. NodeJS (NPM)

Installations

purple-hats includes installer scripts which automates the installation of the required components used by purple-hats. Currently, it is supported on macOS and Linux (Red Hat, Centos, Ubuntu, OpenSuse/Suse).

Instructions for changing file permissions

Commands to modify file permissions

In the event you cannot access the files due to running the installer scripts with elevated privileges previously, you can modify the file permissions to the appropriate owner and group.

# Linux/Unix: The user id (uid) and group id (gid) by default should be the same
# MacOS: The uid and gid may differ, if the user group doesn't exist, set the group as staff

# You can check the current user's uid and gid with the following command
id

# Update permissions for files
# Can provide the name or numerical id
sudo chown <user:group> <filename>

# Update permissions for directories
sudo chown -R <user:group> <filename>

MacOS

As MacOS does not have a builtin package manager. Node Version Manager (NVM) will be used to install NodeJS. Please run the installer script mac-installer.sh

# Navigate into the directory, if not done so
cd purple-hats/installers

# Run the installer script for MacOS with admin privileges
bash mac-installer.sh
# If you cannot run the script due to insufficient permission, assign execute permission to the file
chmod +x mac-installer.sh

# Run the script again
bash mac-isntaller.sh

Linux

Depending on the Linux Distro, the builtin package manager (YUM, APT or Zypper) will be used for the respective Linux Distro to install NodeJS. Please run the installer script linux-installer.sh

# If you cannot run the script due to insufficient permission, assign execute permission to the file
chmod +x linux-installer.sh

# Run the script again
bash linux-installer.sh

Features

purple-hats can perform the following functions to crawl the target URI. Results will be generated in JSON format before being compiled into a HTML file. To start using purple-hats, run the following command(s)

# Navigate into the directory, if not done so
cd purple-hats

# Execute run.sh with admin privileges to start using purple-hats
bash run.sh

NOTE: An online test-site by Web Scraper is used to demonstrate purple-hats' features.

1. Crawling of sitemap

The crawler will then generate the results based on the links found within the provided URL.

Required inputs

Sample Output

user@user-MacBook-Pro  Desktop % cd purple-hats
user@user-MacBook-Pro purple-hats %  bash run.sh
Welcome to HAT's Accessibility Testing Tool!
We recommend using Chrome browser for the best experience.

What would you like to scan today?
1) sitemap.xml file containing links
2) public domain URL
#? 1
Please enter file link: https://webscraper.io/test-sites/e-commerce/allinone
Scanning website...

#The crawler will then start scraping from the file link provided above.
#Console results

user@user-MacBook-Pro purple-hats %

2. Crawling of Domain

The crawler will recursively visit the links to generate the results from all the pages found from the input domain. This will take a longer time depending on the number of links and pages that are being transversed.

Under this feature, it will also take into consideration of the presence of a login page.

2. Crawling of PublicDomain w/o Login Page

Required inputs

  • A website URL

Sample Output - Public Domain without Login Page

user@user-MacBook-Pro  Desktop % cd purple-hats
user@user-MacBook-Pro purple-hats % bash run.sh
Welcome to HAT's Accessibility Testing Tool!
We recommend using Chrome browser for the best experience.

What would you like to scan today?
1) sitemap.xml file containing links
2) public domain URL
#? 2
Please enter domain URL: https://webscraper.io/test-sites/e-commerce/allinone
Do you need to login to your domain? Y/N: N
Scanning website...

#The crawler will then start scraping from the file link provided above.
#Console results

user@user-MacBook-Pro purple-hats %

purple-hats's People

Contributors

yangkaiting avatar marcuskerh2017 avatar cy002 avatar

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.