Skip to main content

pypom-axe

pypom-axe integrates the aXe accessibility testing API with PyPOM.

License PyPI wheel Issues

Requirements

You will need the following prerequisites in order to use pypom-axe:

  • Python 2.7 or 3.6

  • PyPOM >= 1.2.0

Installation

To install pypom-axe:

$ pip install pypom-axe

Usage

pypom-axe will run the aXe accessibility checks by default whenever its wait_for_page_to_load() method is called.

If you overload wait_for_page_to_load(), you will need to call super([YOUR CLASS NAME], self).wait_for_page_to_load() within your overloaded method.

You can disable accessibility tests by setting the environment variable ACCESSIBILITY_DISABLED to true.

You can enable output of the JSON results by setting the environment variable ACCESSIBILITY_REPORTING to true. This will output files to ./results/, which must be created if it does not already exist.

base.py

from pypom_axe.axe import AxePage as Page

class Base(Page):

def wait_for_page_to_load(self, context=None, options=None, impact=None):
  super(Base, self).wait_for_page_to_load()
  self.wait.until(lambda s: self.seed_url in s.current_url)
  return self

You also have the option to customize the accessibility analysis using the parameters context, options, and impact.

context and options directly reflect the parameters used in axe-core. For more information on context and options, view the aXe documentation here.

The third parameter, impact, allows you to filter violations by their impact level.

The options are 'critical', 'serious' and 'minor', with the default value set to None.

This will filter violations for the impact level specified, and all violations with a higher impact level.

from pypom_axe.axe import AxePage as Page

class Base(Page):

def wait_for_page_to_load(self, context=None, options=None, impact=None):
  super(Base, self).wait_for_page_to_load(None, None, 'serious')
  self.wait.until(lambda s: self.seed_url in s.current_url)
  return self

Resources

CHANGELOG

version 0.1.0

  • Enabled the use of two new environment variables.

  1. ACCESSIBILITY_DISABLED=true will disable accessibility tests.

  2. ACCESSIBILITY_REPORTING=false will enable the output of JSON results.

version 0.0.7

  • Modified impact_included class method to reflect changes to the aXe API:

  • There are now only 3 impact levels: 'critical', 'serious', and 'minor'

Metadata

Release files for pypom-axe 0.1.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 pypom-axe 0.1.1
File Size Uploaded Provenance Actions
pypom-axe-0.1.1.tar.gz 64.6 kB Without provenance Details for pypom-axe-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pypom-axe 0.1.1
File Interpreter ABI Platform Actions
pypom_axe-0.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for pypom_axe-0.1.1-py2.py3-none-any.whl

Total release size: 130.6 kB

Release files / pypom-axe-0.1.1.tar.gz

Download URL pypom-axe-0.1.1.tar.gz
Size 64.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7110e60ce7d99c8006c64d478250786a8019f3ad77cb0a942644cee173fc68bc
BLAKE2b-256 checksum
How to use checksums
1421e0e214749c2ce7976b7d774b5ffb3e7ec516ed8380ee24ea9c5a52934d16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pypom_axe-0.1.1-py2.py3-none-any.whl

Download URL pypom_axe-0.1.1-py2.py3-none-any.whl
Size 66.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
745b3ec435c862783bec3df25e3f22b002743b2624f7e1d99dc339953594fb2e
BLAKE2b-256 checksum
How to use checksums
c92df6728c9fa07e3d3b97d8742bfeed7a9056775563453eb597704dc552e289
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pypom-axe 0.1.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.

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