Classes
A11yIssue
5
▼
A single accessibility finding.
A11yIssue
5
▼
A single accessibility finding.
Attributes
| Name | Type | Description |
|---|---|---|
lineno |
int
|
— |
col_offset |
int
|
— |
rule |
str
|
— |
message |
str
|
— |
severity |
str
|
— |
_A11yVisitor
9
▼
AST visitor that collects accessibility issues.
_A11yVisitor
9
▼
AST visitor that collects accessibility issues.
Methods
visit_Data
1
▼
visit_Data
1
▼
def visit_Data(self, node: Data) -> None
Parameters
| Name | Type | Description |
|---|---|---|
node |
— |
visit_Output
1
▼
visit_Output
1
▼
def visit_Output(self, node: Output) -> None
Parameters
| Name | Type | Description |
|---|---|---|
node |
— |
finalize
0
▼
Post-traversal checks (e.g., input-label association).
finalize
0
▼
def finalize(self) -> None
Internal Methods 6 ▼
__init__
0
▼
__init__
0
▼
def __init__(self) -> None
_check_img_alt
1
▼
Check tags have alt attributes.
_check_img_alt
1
▼
def _check_img_alt(self, node: Data) -> None
Parameters
| Name | Type | Description |
|---|---|---|
node |
— |
_check_headings
1
▼
Check heading hierarchy (no skipping levels).
_check_headings
1
▼
def _check_headings(self, node: Data) -> None
Parameters
| Name | Type | Description |
|---|---|---|
node |
— |
_check_html_lang
1
▼
Check tag has lang attribute.
_check_html_lang
1
▼
def _check_html_lang(self, node: Data) -> None
Parameters
| Name | Type | Description |
|---|---|---|
node |
— |
_collect_labels
1
▼
Collect label for= IDs for input association checking.
_collect_labels
1
▼
def _collect_labels(self, node: Data) -> None
Parameters
| Name | Type | Description |
|---|---|---|
node |
— |
_collect_inputs
1
▼
Collect input/select/textarea elements for label association.
_collect_inputs
1
▼
def _collect_inputs(self, node: Data) -> None
Parameters
| Name | Type | Description |
|---|---|---|
node |
— |
Functions
check_a11y
1
list[A11yIssue]
▼
Run accessibility checks on a parsed template AST.
check_a11y
1
list[A11yIssue]
▼
def check_a11y(template: Template) -> list[A11yIssue]
Parameters
| Name | Type | Description |
|---|---|---|
template |
Template |
Parsed Template AST node. |
Returns
list[A11yIssue]