First deployment
This commit is contained in:
23
tests/test_wcag_regression.py
Normal file
23
tests/test_wcag_regression.py
Normal file
@@ -0,0 +1,23 @@
|
||||
def test_keyboard_focus_and_escape_hooks_exist(client):
|
||||
response = client.get("/")
|
||||
assert response.status_code == 200
|
||||
html = response.text
|
||||
assert "*:focus-visible" in html
|
||||
assert '@keydown.escape.window="closeSummary()"' in html
|
||||
assert "function policyDisclosures()" in html
|
||||
|
||||
|
||||
def test_icon_controls_and_labels_exist(client):
|
||||
response = client.get("/")
|
||||
html = response.text
|
||||
assert 'aria-label="Copy article link"' in html
|
||||
assert 'aria-label="Back to top"' in html
|
||||
assert "function backToTopIsland()" in html
|
||||
|
||||
|
||||
def test_policy_modal_accessibility_contract(client):
|
||||
response = client.get("/")
|
||||
html = response.text
|
||||
assert 'role="dialog"' in html
|
||||
assert 'aria-modal="true"' in html
|
||||
assert 'aria-label="Close policy modal"' in html
|
||||
Reference in New Issue
Block a user