axe-playwright-python 0.1.6__tar.gz → 0.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/.github/workflows/python.yaml +1 -1
  2. axe_playwright_python-0.1.7/.vscode/settings.json +9 -0
  3. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/CHANGELOG.md +5 -1
  4. axe_playwright_python-0.1.7/CONTRIBUTING.md +47 -0
  5. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/PKG-INFO +2 -1
  6. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/axe_playwright_python/base.py +1 -1
  7. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/examples/usage.py +2 -1
  8. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/mkdocs.yml +1 -1
  9. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/pyproject.toml +2 -1
  10. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/tests/test_axe_sync_playwright.py +21 -4
  11. axe_playwright_python-0.1.6/.vscode/settings.json +0 -4
  12. axe_playwright_python-0.1.6/CONTRIBUTING.md +0 -46
  13. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/.gitignore +0 -0
  14. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/.pre-commit-config.yaml +0 -0
  15. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/LICENSE +0 -0
  16. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/README.md +0 -0
  17. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/axe_playwright_python/__init__.py +0 -0
  18. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/axe_playwright_python/async_playwright.py +0 -0
  19. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/axe_playwright_python/axe.min.js +0 -0
  20. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/axe_playwright_python/sync_playwright.py +0 -0
  21. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/axe_playwright_python/violations.txt +0 -0
  22. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/docs/api.md +0 -0
  23. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/docs/index.md +0 -0
  24. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/docs/usage.md +0 -0
  25. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/tests/__init__.py +0 -0
  26. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/tests/test_axe_async_playwright.py +0 -0
  27. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/tests/test_page.html +0 -0
  28. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/tests/test_report.txt +0 -0
  29. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/tests/test_report_color.txt +0 -0
  30. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/tests/test_report_save.py +0 -0
  31. {axe_playwright_python-0.1.6 → axe_playwright_python-0.1.7}/tests/test_result.json +0 -0
@@ -13,7 +13,7 @@ jobs:
13
13
  strategy:
14
14
  fail-fast: false
15
15
  matrix:
16
- python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
16
+ python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
17
17
  steps:
18
18
  - uses: actions/checkout@v5
19
19
  - name: Set up Python 3
@@ -0,0 +1,9 @@
1
+ {
2
+ "python.linting.flake8Enabled": true,
3
+ "python.linting.enabled": true,
4
+ "python.testing.pytestArgs": [
5
+ "tests"
6
+ ],
7
+ "python.testing.unittestEnabled": false,
8
+ "python.testing.pytestEnabled": true
9
+ }
@@ -2,11 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.1.7] - November 30, 2025
6
+
7
+ - Fixed issue with passing custom options to `Axe.run()` method, which caused options to be ignored.
8
+ - Added support for Python 3.14.
9
+
5
10
  ## [0.1.6] - October 23, 2025
6
11
 
7
12
  - Upgraded axe-core JS version to v4.11.0. You may see the number of violations change as a result, as new axe-core versions sometimes add new rules and update existing ones.
8
13
 
9
-
10
14
  ## [0.1.5] - June 21, 2025
11
15
 
12
16
  - Upgraded axe-core JS version to v4.10.3. You may see the number of violations change as a result, as they added new rules and updated existing ones.
@@ -0,0 +1,47 @@
1
+ # How to contribute
2
+
3
+ ## Development
4
+
5
+ Install the project dependencies:
6
+
7
+ ```sh
8
+ python -m pip install -e '.[dev]'
9
+ playwright install --with-deps
10
+ pre-commit install
11
+ ```
12
+
13
+ Run the tests:
14
+
15
+ ```sh
16
+ python -m pytest
17
+ ```
18
+
19
+ ## Documentation
20
+
21
+ Build locally:
22
+
23
+ ```sh
24
+ mkdocs serve
25
+ ```
26
+
27
+ Deploy to GitHub Pages:
28
+
29
+ ```sh
30
+ mkdocs gh-deploy
31
+ ```
32
+
33
+ ## Publishing
34
+
35
+ 1. Update the CHANGELOG with description of changes
36
+
37
+ 2. Update the version number in pyproject.toml
38
+
39
+ 3. Push the changes to the main branch
40
+
41
+ 4. Publish to PyPi:
42
+
43
+ ```sh
44
+ export FLIT_USERNAME=__token__
45
+ export FLIT_PASSWORD=your-pypi-token
46
+ flit publish
47
+ ```
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: axe-playwright-python
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: Automated web accessibility testing using axe-core engine and Playwright.
5
5
  Keywords: accessibility,axe,axe-core,playwright
6
6
  Author-email: Pamela Fox <pamela.fox@gmail.com>
@@ -14,6 +14,7 @@ Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
16
  Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
17
18
  Classifier: Topic :: Adaptive Technologies
18
19
  Classifier: Topic :: Software Development
19
20
  Classifier: Topic :: Software Development :: Quality Assurance
@@ -33,7 +33,7 @@ class AxeBase(ABC):
33
33
  args_list.append(repr(context))
34
34
  # If options is passed, add to args
35
35
  if options:
36
- args_list.append(str(options))
36
+ args_list.append(json.dumps(options))
37
37
  # Add comma delimiter only if both parameters are passed
38
38
  args = ",".join(args_list)
39
39
 
@@ -1,6 +1,7 @@
1
- from axe_core_python.sync_playwright import Axe
2
1
  from playwright.sync_api import sync_playwright
3
2
 
3
+ from axe_playwright_python.sync_playwright import Axe
4
+
4
5
  axe = Axe()
5
6
 
6
7
  with sync_playwright() as playwright:
@@ -7,7 +7,7 @@ repo_name: "axe-playwright-python"
7
7
  repo_url: "https://github.com/pamelafox/axe-playwright-python"
8
8
 
9
9
  # Copyright
10
- copyright: "Copyright &copy; Ruslan Iskov"
10
+ copyright: "Copyright &copy; Ruslan Iskov, Pamela Fox"
11
11
 
12
12
  theme:
13
13
  name: "material"
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "axe-playwright-python"
3
3
  description = "Automated web accessibility testing using axe-core engine and Playwright."
4
- version = "0.1.6"
4
+ version = "0.1.7"
5
5
  authors = [{name = "Pamela Fox", "email" = "pamela.fox@gmail.com"}]
6
6
  requires-python = ">=3.8"
7
7
  readme = "README.md"
@@ -19,6 +19,7 @@ classifiers = [
19
19
  "Programming Language :: Python :: 3.11",
20
20
  "Programming Language :: Python :: 3.12",
21
21
  "Programming Language :: Python :: 3.13",
22
+ "Programming Language :: Python :: 3.14",
22
23
  "Topic :: Adaptive Technologies",
23
24
  "Topic :: Software Development",
24
25
  "Topic :: Software Development :: Quality Assurance",
@@ -36,6 +36,13 @@ def webkit_page():
36
36
  browser.close()
37
37
 
38
38
 
39
+ def _perform_axe_run(page):
40
+ page.goto("file://" + str(TEST_FILE_PATH))
41
+ axe = Axe()
42
+ results = axe.run(page=page)
43
+ return results.response
44
+
45
+
39
46
  def test_run_axe_sample_page_firefox(firefox_page):
40
47
  """Run axe against sample page and verify JSON output is as expected."""
41
48
  data = _perform_axe_run(firefox_page)
@@ -66,8 +73,18 @@ def test_run_axe_sample_page_webkit(webkit_page):
66
73
  assert len(data["violations"]) == 9
67
74
 
68
75
 
69
- def _perform_axe_run(page):
70
- page.goto("file://" + str(TEST_FILE_PATH))
76
+ def test_run_axe_detects_region_violation(chromium_page):
77
+ """Baseline check confirming region violation is reported by default."""
78
+ chromium_page.goto("file://" + str(TEST_FILE_PATH))
71
79
  axe = Axe()
72
- results = axe.run(page=page)
73
- return results.response
80
+
81
+ # First run with default options
82
+ results = axe.run(page=chromium_page)
83
+ violation_ids = {violation["id"] for violation in results.response["violations"]}
84
+ assert "region" in violation_ids
85
+
86
+ # Now run again with region rule disabled
87
+ options = {"rules": {"region": {"enabled": False}}}
88
+ results = axe.run(page=chromium_page, options=options)
89
+ violation_ids = {violation["id"] for violation in results.response["violations"]}
90
+ assert "region" not in violation_ids
@@ -1,4 +0,0 @@
1
- {
2
- "python.linting.flake8Enabled": true,
3
- "python.linting.enabled": true
4
- }
@@ -1,46 +0,0 @@
1
- # How to contribute
2
-
3
- ## Development
4
-
5
- Install the project dependencies:
6
-
7
- ```sh
8
- python3 -m pip install -e '.[dev]'
9
- playwright install --with-deps
10
- pre-commit install
11
- ```
12
-
13
- Run the tests:
14
-
15
- ```sh
16
- python3 -m pytest
17
- ```
18
-
19
- ## Publishing
20
-
21
- Configure flit to use token-based PyPi credentials:
22
-
23
- ```sh
24
- export FLIT_USERNAME=__token__
25
- export FLIT_PASSWORD=your-pypi-token
26
- ```
27
-
28
- Publish to PyPi:
29
-
30
- ```sh
31
- flit publish
32
- ```
33
-
34
- ## Documentation
35
-
36
- Build locally:
37
-
38
- ```sh
39
- mkdocs serve
40
- ```
41
-
42
- Deploy to GitHub Pages:
43
-
44
- ```sh
45
- mkdocs gh-deploy
46
- ```