Skip to main content

Accessibility Automation for Web Apps with Python and Playwright.

This project uses HTML CodeSniffer and Deque Axe

HTML CodeSniffer : checks HTML source code and detects any Accessibility violations. Comes with standards that cover the three (A, AA & AAA) conformance levels of the W3C's Web Content Accessibility Guidelines (WCAG) 2.1 and the U.S. Section 508 legislation.

Deque Axe : World’s leading digital accessibility toolkit. Powerful and accurate accessibility toolkit can get you to 80% issue coverage, or more, during development.

Features

  1. Simple & Easy to use
  2. No need of prior knowledge on Accessibility
  3. Works with Python Playwright
  4. Rich Reporting
  5. Open source

Installation

For maven based project add the below dependency

pip install python-a11y-playwright

Getting Started

Using HTML CodeSniffer

Below is the example usage using HTML CodeSniffer.

from pathlib import Path

from automateda11y.pw.settings import Settings
from playwright.sync_api import sync_playwright
from automateda11y.pw.htmlcsrunner import HtmlCsRunner


def json_reports_dir():
    return Path(__file__).parent.parent.__str__()


with sync_playwright() as p:
    Settings.report_dir = json_reports_dir() + '/reports'
    browser = p.chromium.launch(headless=False)
    page = browser.new_page()
    page.goto("http://playwright.dev")
    data = HtmlCsRunner(page).execute()
    browser.close()

Using Deque Axe

Below is the example usage using Deque Axe.

from pathlib import Path

from automateda11y.pw.settings import Settings
from playwright.sync_api import sync_playwright
from automateda11y.pw.axerunner import AxeRunner


def json_reports_dir():
    return Path(__file__).parent.parent.__str__()


with sync_playwright() as p:
    Settings.report_dir = json_reports_dir() + '/reports'
    browser = p.chromium.launch(headless=False)
    page = browser.new_page()
    page.goto("http://playwright.dev")
    data = AxeRunner(page).execute()
    browser.close()

Metadata

Release files for python-a11y-playwright 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-a11y-playwright 1.0.1
File Size Uploaded Provenance Actions
python-a11y-playwright-1.0.1.tar.gz 9.2 kB Without provenance Details for python-a11y-playwright-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-a11y-playwright 1.0.1
File Interpreter ABI Platform Actions
python_a11y_playwright-1.0.1-py3-none-any.whl Python 3 none any Details for python_a11y_playwright-1.0.1-py3-none-any.whl

Total release size: 24.3 kB

Release files / python-a11y-playwright-1.0.1.tar.gz

Download URL python-a11y-playwright-1.0.1.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ac0a6e87db1626f06fb31532d20462ada73b2a7e3cf191f837f00319f1474be8
BLAKE2b-256 checksum
How to use checksums
5f6546f79be7d70eb22525c015cf8662ed697a053fef6bb7d2cc0bd9428dd09c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Release files / python_a11y_playwright-1.0.1-py3-none-any.whl

Download URL python_a11y_playwright-1.0.1-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f564d12201cdf33766ca3b16ac5469c97f38dd4af10f2aa6b574bc739871899d
BLAKE2b-256 checksum
How to use checksums
d6a5bc4b98e874d6425e1e5c07153c22357b6f5d3fd61e30dee575013f45aa13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Security for python-a11y-playwright 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page