Accessibility Test Harness
API Contract
REST
/api/v1/accessibility-tests
7 endpoints
GET
/api/v1/accessibility-tests/api/v1/accessibility-tests
List all recorded accessibility test results
Public
Response Example
{
"data": [
{
"id": "at-001",
"test_type": "semantic_label",
"widget_key": "submit-btn-001",
"passed": true,
"run_at": "2026-03-26T08:10:00Z"
},
{
"id": "at-002",
"test_type": "focus_traversal",
"widget_key": "login-form",
"passed": false,
"run_at": "2026-03-26T08:12:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2
}
}
GET
/api/v1/accessibility-tests/api/v1/accessibility-tests/:id
Get details of a specific accessibility test result
Public
Response Example
{
"id": "at-002",
"test_type": "focus_traversal",
"widget_key": "login-form",
"passed": false,
"failure_reason": "Focus skipped 'password-field' widget during traversal",
"traversal_order": [
"email-field",
"forgot-password-link",
"submit-btn"
],
"run_at": "2026-03-26T08:12:00Z"
}
POST
/api/v1/accessibility-tests/api/v1/accessibility-tests
Run an accessibility test against a widget or semantic tree
Public
Request Example
{
"test_type": "semantic_label",
"widget_key": "close-modal-btn",
"expected_label": "Close appointment details dialog"
}
Response Example
{
"id": "at-003",
"test_type": "semantic_label",
"widget_key": "close-modal-btn",
"expected_label": "Close appointment details dialog",
"passed": true,
"actual_label": "Close appointment details dialog",
"run_at": "2026-03-26T11:55:00Z"
}
PUT
/api/v1/accessibility-tests/api/v1/accessibility-tests/:id
Update expected values on a test fixture for re-run
Public
Request Example
{
"expected_label": "Close dialog"
}
Response Example
{
"id": "at-003",
"test_type": "semantic_label",
"widget_key": "close-modal-btn",
"expected_label": "Close dialog",
"passed": null,
"updated_at": "2026-03-26T11:56:00Z"
}
DELETE
/api/v1/accessibility-tests/api/v1/accessibility-tests/:id
Delete a test result record
Public
Response Example
{
"message": "Test result at-003 deleted"
}
POST
/api/v1/accessibility-tests/api/v1/accessibility-tests/simulate-traversal
Simulate focus traversal on a widget tree and return the traversal order
Public
Request Example
{
"widget_key": "registration-form",
"session_id": "sess-abc123"
}
Response Example
{
"widget_key": "registration-form",
"traversal_order": [
"first-name-field",
"last-name-field",
"email-field",
"password-field",
"terms-checkbox",
"register-btn"
],
"total_focusable": 6,
"issues": [],
"passed": true
}
POST
/api/v1/accessibility-tests/api/v1/accessibility-tests/verify-announcement
Assert that an expected message was announced to the active screen reader
Public
Request Example
{
"expected_message": "Password reset email sent",
"session_id": "sess-abc123"
}
Response Example
{
"expected_message": "Password reset email sent",
"announced": true,
"actual_message": "Password reset email sent",
"announced_at": "2026-03-26T10:30:05Z",
"verified": true
}