outloud 0.2.0__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.
- outloud-0.2.0/.gitignore +9 -0
- outloud-0.2.0/LICENSE +202 -0
- outloud-0.2.0/PKG-INFO +244 -0
- outloud-0.2.0/README.md +208 -0
- outloud-0.2.0/docs/RULES.md +272 -0
- outloud-0.2.0/pyproject.toml +60 -0
- outloud-0.2.0/src/outloud/__init__.py +47 -0
- outloud-0.2.0/src/outloud/cli.py +125 -0
- outloud-0.2.0/src/outloud/content.py +527 -0
- outloud-0.2.0/src/outloud/criteria.py +250 -0
- outloud-0.2.0/src/outloud/findings.py +109 -0
- outloud-0.2.0/src/outloud/fonts.py +344 -0
- outloud-0.2.0/src/outloud/model.py +490 -0
- outloud-0.2.0/src/outloud/registry.py +257 -0
- outloud-0.2.0/src/outloud/report.py +322 -0
- outloud-0.2.0/src/outloud/rules/__init__.py +4 -0
- outloud-0.2.0/src/outloud/rules/_common.py +129 -0
- outloud-0.2.0/src/outloud/rules/catalogue.yaml +927 -0
- outloud-0.2.0/src/outloud/rules/document.py +206 -0
- outloud-0.2.0/src/outloud/rules/figures.py +75 -0
- outloud-0.2.0/src/outloud/rules/headings.py +99 -0
- outloud-0.2.0/src/outloud/rules/links.py +170 -0
- outloud-0.2.0/src/outloud/rules/lists.py +43 -0
- outloud-0.2.0/src/outloud/rules/navigation.py +35 -0
- outloud-0.2.0/src/outloud/rules/notes_math.py +106 -0
- outloud-0.2.0/src/outloud/rules/order.py +53 -0
- outloud-0.2.0/src/outloud/rules/pagination.py +56 -0
- outloud-0.2.0/src/outloud/rules/quality.py +105 -0
- outloud-0.2.0/src/outloud/rules/tables.py +308 -0
- outloud-0.2.0/src/outloud/rules/tagging.py +358 -0
- outloud-0.2.0/src/outloud/rules/text.py +154 -0
- outloud-0.2.0/src/outloud/viewer.py +521 -0
outloud-0.2.0/.gitignore
ADDED
outloud-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
outloud-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: outloud
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: What a PDF says out loud: a PDF accessibility checker for the terminal, CI and browser. PDF/UA-1 and WCAG 2.2, plus the semantic checks a validator cannot make.
|
|
5
|
+
Project-URL: Homepage, https://visionably.ai/research/outloud
|
|
6
|
+
Project-URL: Repository, https://github.com/visionably/outloud
|
|
7
|
+
Project-URL: Documentation, https://github.com/visionably/outloud/blob/main/docs/RULES.md
|
|
8
|
+
Project-URL: Issues, https://github.com/visionably/outloud/issues
|
|
9
|
+
Author-email: Visionably <opensource@visionably.ai>
|
|
10
|
+
License-Expression: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: a11y,accessibility,checker,matterhorn,pdf,pdf/ua,tagged-pdf,wcag
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
17
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
25
|
+
Classifier: Topic :: Text Processing
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
Requires-Dist: click>=8.1
|
|
28
|
+
Requires-Dist: fonttools>=4.40
|
|
29
|
+
Requires-Dist: pikepdf>=8.0
|
|
30
|
+
Requires-Dist: pymupdf>=1.24
|
|
31
|
+
Requires-Dist: pyyaml>=6.0
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
34
|
+
Requires-Dist: ruff>=0.5; extra == 'dev'
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<img src="https://raw.githubusercontent.com/visionably/outloud/main/docs/img/logo.svg" alt="outloud" width="360">
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
<h3 align="center">What a PDF says out loud.</h3>
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
The PDF accessibility checker that runs anywhere: PDF/UA-1 and WCAG 2.2, in your terminal, your CI and your browser.<br>
|
|
45
|
+
It finds what validators find, and then what they cannot.
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
<p align="center">
|
|
49
|
+
<a href="https://github.com/visionably/outloud/actions/workflows/ci.yml"><img src="https://github.com/visionably/outloud/actions/workflows/ci.yml/badge.svg" alt="tests"></a>
|
|
50
|
+
<a href="https://github.com/visionably/outloud/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="Apache 2.0"></a>
|
|
51
|
+
<img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="Python 3.10+">
|
|
52
|
+
<img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey.svg" alt="macOS, Linux, Windows">
|
|
53
|
+
<img src="https://img.shields.io/badge/rules-90-c25c29.svg" alt="90 rules">
|
|
54
|
+
<a href="https://github.com/visionably/outloud/blob/main/CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-2c6e49.svg" alt="PRs welcome"></a>
|
|
55
|
+
</p>
|
|
56
|
+
|
|
57
|
+
<p align="center">
|
|
58
|
+
<img src="https://raw.githubusercontent.com/visionably/outloud/main/docs/img/app-findings.png" alt="The outloud app: a findings list on the left, the PDF page in the middle with every finding outlined in red or amber, and on the right the page as a screen reader would read it" width="100%">
|
|
59
|
+
</p>
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pipx install outloud # or: uv tool install outloud
|
|
63
|
+
outloud report.pdf # check it
|
|
64
|
+
outloud --view # or open the app and drop files in
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
No Java. No Windows. No upload. Nothing leaves your machine.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Why
|
|
72
|
+
|
|
73
|
+
The standard tools for checking a PDF's accessibility are **PAC**, which is a Windows desktop program, and **veraPDF**, which is a Java validator built for conformance labs. If you are on a Mac, in a CI pipeline, or just want an answer in two seconds, there has been nothing.
|
|
74
|
+
|
|
75
|
+
And both of them test whether the *keys exist*. A figure has alternative text: pass. A table has header cells: pass. They cannot tell you that the alternative text is `IMG_2041.jpg`, that the header cells are empty, or that a sentence on the page is marked as decoration so every screen reader skips it.
|
|
76
|
+
|
|
77
|
+
This is a published, professionally remediated report. **veraPDF passes it.** Its appendix table has header cells with nothing in them, so a screen reader announces every value in it against silence:
|
|
78
|
+
|
|
79
|
+
<p align="center">
|
|
80
|
+
<img src="https://raw.githubusercontent.com/visionably/outloud/main/docs/img/app-real.png" alt="A real 31-page report open in outloud at page 28. One warning, TBL-011: six data cells are associated only with empty header cells. The cells are outlined on the page, and the finding shows its fix." width="100%">
|
|
81
|
+
</p>
|
|
82
|
+
|
|
83
|
+
outloud exists for findings like that one.
|
|
84
|
+
|
|
85
|
+
## What you get
|
|
86
|
+
|
|
87
|
+
**Two layers, kept apart.**
|
|
88
|
+
*Conformance* rules test a requirement of ISO 14289-1 (PDF/UA-1), the same ones veraPDF and PAC test, and are calibrated to agree with veraPDF: on 58 one-defect fixtures and 102 real files, they agree on all 160.
|
|
89
|
+
*Semantic* rules test what a conformant file still gets wrong: words printed on the page that no tag announces, prose marked as an artifact, header cells that are empty or shredded one word per row, alternative text that is a file name or LaTeX source, a "formula" that swallowed a sentence, a page painted in a different order from its tags, a title that is the file name. Each names its evidence so a person can judge. No validator runs these.
|
|
90
|
+
|
|
91
|
+
**Every finding tells you what to do.** Page, evidence, the ISO clause and Matterhorn checkpoint it rests on, the WCAG 2.2 criteria it affects, and a one-line fix.
|
|
92
|
+
|
|
93
|
+
<p align="center">
|
|
94
|
+
<img src="https://raw.githubusercontent.com/visionably/outloud/main/docs/img/terminal.png" alt="Terminal output of outloud on the demo file: four errors and several warnings, each with evidence, the clause and WCAG criteria, and a green fix line; then one-line summaries for PDF/UA-1 checkpoints and WCAG 2.2" width="92%">
|
|
95
|
+
</p>
|
|
96
|
+
|
|
97
|
+
**Pass and fail by criterion, like PAC's two tabs.** Every checkpoint of the Matterhorn Protocol 1.1 (31) and every WCAG 2.2 success criterion at A and AA (55), each with one of five honest statuses: **fail**, **warning**, **pass**, **not applicable** (no forms in this file, so nothing to label) and **needs a person**, with a sentence on what to look at. A file without tables does not "pass" the table rules.
|
|
98
|
+
|
|
99
|
+
<p align="center">
|
|
100
|
+
<img src="https://raw.githubusercontent.com/visionably/outloud/main/docs/img/app-criteria.png" alt="The criteria tab of the app showing WCAG 2.2: 1.1.1, 1.3.1 and 1.3.2 fail with the rule ids behind them, then criteria that need a person with a note on what to check" width="100%">
|
|
101
|
+
</p>
|
|
102
|
+
|
|
103
|
+
**See where.** Findings carry bounding boxes. The app outlines them on the rendered page, shows the structure tree (click an element to see where it sits), and reads each page back in the order a screen reader would, with artifacts shown as what a reader skips.
|
|
104
|
+
|
|
105
|
+
**Built for pipelines.** Exit codes, JSON, SARIF 2.1.0 for GitHub code scanning (with the fix as help text and a WCAG taxonomy), and a single-file HTML report.
|
|
106
|
+
|
|
107
|
+
## Use
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
outloud file.pdf # findings on the terminal, exit 1 if any error
|
|
111
|
+
outloud a.pdf b.pdf reports/ # several files; directories are searched
|
|
112
|
+
outloud file.pdf --criteria # add the PDF/UA-1 and WCAG 2.2 tables
|
|
113
|
+
outloud out.pdf --source in.pdf # also compare a remediated file with its original
|
|
114
|
+
outloud *.pdf --json r.json --sarif r.sarif --html r.html
|
|
115
|
+
outloud file.pdf --layer conformance # only what a validator would run
|
|
116
|
+
outloud file.pdf --only TBL-011,TAG-003 # or --skip
|
|
117
|
+
outloud --list-rules
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Verdicts: **pass**, **review** (warnings only), **fail** (at least one error), **unreadable**. `--fail-on warning` makes warnings fail the exit status; `--fail-on never` reports without failing.
|
|
121
|
+
|
|
122
|
+
Try it on the bundled example, one page with nine different defects:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
outloud examples/demo.pdf --view
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### The app
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
outloud --view # opens empty: drop PDFs in, pick them, or type a path
|
|
132
|
+
outloud report.pdf --view # opens with that file already checked
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
<p align="center">
|
|
136
|
+
<img src="https://raw.githubusercontent.com/visionably/outloud/main/docs/img/app-drop.png" alt="The empty app: a drop zone that says Drop a PDF here, a link to choose a file, and a box for a path on this machine" width="80%">
|
|
137
|
+
</p>
|
|
138
|
+
|
|
139
|
+
A small local server from the Python standard library. It binds to localhost, keeps dropped files in a temporary folder it removes on exit, and stops with Ctrl+C. Deep links work: `?doc=report&tab=crit&fw=wcag22&f=TBL-011`.
|
|
140
|
+
|
|
141
|
+
### In CI
|
|
142
|
+
|
|
143
|
+
```yaml
|
|
144
|
+
- run: pipx install outloud
|
|
145
|
+
- run: outloud dist/*.pdf --sarif outloud.sarif
|
|
146
|
+
- uses: github/codeql-action/upload-sarif@v3
|
|
147
|
+
if: always()
|
|
148
|
+
with: { sarif_file: outloud.sarif }
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### As a library
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
from outloud import check
|
|
155
|
+
|
|
156
|
+
result = check("report.pdf")
|
|
157
|
+
print(result.verdict, result.errors, result.warnings)
|
|
158
|
+
for f in result.sorted_findings():
|
|
159
|
+
print(f.rule, f.page, f.message, f.boxes)
|
|
160
|
+
for row in result.criteria["wcag22"]:
|
|
161
|
+
print(row["id"], row["name"], row["status"])
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## How it compares
|
|
165
|
+
|
|
166
|
+
| | **outloud** | PAC | veraPDF | pdfa11y |
|
|
167
|
+
|---|---|---|---|---|
|
|
168
|
+
| Runs on macOS and Linux | ✅ | ❌ Windows only | ✅ needs a JVM | ✅ |
|
|
169
|
+
| Command line, exit codes, CI | ✅ | ❌ | ✅ | ✅ |
|
|
170
|
+
| PDF/UA-1 conformance | ✅ calibrated to veraPDF | ✅ | ✅ reference | ✅ subset |
|
|
171
|
+
| PDF/UA-2 | ❌ not yet | ✅ | ✅ | ✅ |
|
|
172
|
+
| Per-criterion view, PDF/UA and WCAG | ✅ | ✅ | ❌ | ❌ |
|
|
173
|
+
| Not-applicable and needs-a-person statuses | ✅ | partly | ❌ | ✅ per check |
|
|
174
|
+
| Semantic checks (tags match the page, words make sense) | ✅ 35 rules | ❌ | ❌ | ❌ |
|
|
175
|
+
| Findings outlined on the page | ✅ | ✅ | ❌ | ❌ |
|
|
176
|
+
| Screen-reader preview, structure tree | ✅ | ✅ | ❌ | ❌ |
|
|
177
|
+
| A fix on every finding | ✅ | ❌ | ❌ | ✅ |
|
|
178
|
+
| JSON, SARIF, HTML | ✅ | PDF report | JSON, XML, HTML | JSON, HTML, PDF |
|
|
179
|
+
| Compare a remediated file with its source | ✅ | ❌ | ❌ | ❌ |
|
|
180
|
+
| Licence | Apache 2.0 | proprietary, free | GPL / MPL | MIT |
|
|
181
|
+
|
|
182
|
+
Measured on 17 September 2026 on one machine: veraPDF 1.26.5 (`--flavour ua1`) and outloud timed per file including start-up; [pdfa11y](https://github.com/speedata/pdfa11y) (built from its 25 July 2026 source) timed as one process per corpus, which is how it is meant to run.
|
|
183
|
+
|
|
184
|
+
| Corpus | Files | outloud agrees with veraPDF | pdfa11y agrees with veraPDF | veraPDF | outloud | pdfa11y |
|
|
185
|
+
|---|---|---|---|---|---|---|
|
|
186
|
+
| Fixtures (one defect each, built from scratch) | 58 | 58 of 58 comparable rules | 51 | 34.5 s | 0.2 s | 0.1 s |
|
|
187
|
+
| Bank letters, remediated to PDF/UA-1 | 29 | 29 of 29 | 0 | 30.8 s | 6.9 s | 0.8 s |
|
|
188
|
+
| Bank letters, as printed by Chrome | 29 | 29 of 29 | 29 | 23.7 s | 2.4 s | 0.3 s |
|
|
189
|
+
| Production corpus, originals | 23 | 23 of 23 | 23 | 20.9 s | 9.8 s | 1.2 s |
|
|
190
|
+
| Production corpus, remediated | 21 | 21 of 21 | 1 | 20.2 s | 9.5 s | 0.4 s |
|
|
191
|
+
|
|
192
|
+
On the 21 remediated production files that veraPDF calls compliant, outloud's semantic layer still reports something on 9. Those are the findings the tool is for.
|
|
193
|
+
|
|
194
|
+
Speed is honest rather than headline: 2 to 10 times faster than veraPDF, mostly because there is no JVM to start, and 5 to 20 times slower than pdfa11y, because the walker is Python and every glyph costs a loop iteration. A compiled core is planned once the rule set settles. pdfa11y is a well-built tool and reading its code made outloud better; where the two disagree, and who we think is right, is written up rule by rule in [`docs/COMPARISON-pdfa11y.md`](https://github.com/visionably/outloud/blob/main/docs/COMPARISON-pdfa11y.md). Run the comparisons on your own files with [`scripts/compare_verapdf.py`](https://github.com/visionably/outloud/blob/main/scripts/compare_verapdf.py) and [`scripts/compare_pdfa11y.py`](https://github.com/visionably/outloud/blob/main/scripts/compare_pdfa11y.py).
|
|
195
|
+
|
|
196
|
+
## The rules
|
|
197
|
+
|
|
198
|
+
90 rules, 88 implemented, 2 planned and reported as "not run" so the gap is visible. Every rule is data in [`catalogue.yaml`](https://github.com/visionably/outloud/blob/main/src/outloud/rules/catalogue.yaml) and documented in [`docs/RULES.md`](https://github.com/visionably/outloud/blob/main/docs/RULES.md), which is generated from it, along with an index by Matterhorn checkpoint and by WCAG criterion.
|
|
199
|
+
|
|
200
|
+
| Group | Examples |
|
|
201
|
+
|---|---|
|
|
202
|
+
| Document | tagged, titled, language, PDF/UA identifier, permissions, optional content, XFA |
|
|
203
|
+
| Tagging | untagged content, real content artifacted, role map, shared or dangling marked content, alternative text that hides content |
|
|
204
|
+
| Text and fonts | embedding, Unicode mapping, `.notdef`, invisible text, mappings that are legal but wrong |
|
|
205
|
+
| Headings | skipped levels, first heading, mixed forms, a heading that is a salutation or a paragraph |
|
|
206
|
+
| Tables | headers, scope, nesting, irregular grids, shredded headers, silent headers, a drawn grid nobody tagged |
|
|
207
|
+
| Lists, figures, links, forms, notes, math | structure and naming, placeholder alt text, unlinked URLs, field names that are internal ids, LaTeX as alt text |
|
|
208
|
+
| Reading order, navigation, pagination | paint order against tag order, bookmarks on long files, running heads tagged as content |
|
|
209
|
+
| Source comparison | structure, text and appearance lost between an original and its remediated copy |
|
|
210
|
+
|
|
211
|
+
## How it works
|
|
212
|
+
|
|
213
|
+
`model.py` reads the file once with pikepdf and resolves what is easy to get wrong: role-mapped types, inherited page references, marked content inside form XObjects, attributes by owner, fonts with their Unicode mapping. `content.py` walks each page's content stream and records every painted text run with its characters, position and tag. Glyph-by-glyph text operators are merged into words and lines, kerning gaps become spaces, ligatures are normalised, because otherwise no rule can find a word in a file written by Chrome, Word or TeX. Rules read that model and nothing else, and the registry works out once per file which rules apply.
|
|
214
|
+
|
|
215
|
+
Fixtures are built from nothing by [`tests/builder.py`](https://github.com/visionably/outloud/blob/main/tests/builder.py): a subset TrueType font with a ToUnicode map, marked content, a structure tree with a parent tree, XMP. Every negative test bends exactly one thing in a clean baseline and asserts that one rule fires.
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
.venv/bin/python -m pytest # 84 tests
|
|
219
|
+
.venv/bin/python scripts/make_fixtures.py
|
|
220
|
+
.venv/bin/python scripts/make_screenshots.py # regenerates the pictures on this page
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## What it is not
|
|
224
|
+
|
|
225
|
+
An evaluation, not a certification, and not legal advice. Semantic rules are heuristics; they name what they saw and can be wrong about what it means. A "pass" on a WCAG criterion means the automated rules mapped to it found nothing, not that the criterion is met; the criteria that need a person say so. It does not measure colour contrast yet, tests PDF/UA-1 only, and the Matterhorn failure-condition ids are not yet verified against the protocol text, so the catalogue cites checkpoints.
|
|
226
|
+
|
|
227
|
+
## Roadmap
|
|
228
|
+
|
|
229
|
+
- [ ] Colour contrast (WCAG 1.4.3, 1.4.11)
|
|
230
|
+
- [ ] PDF/UA-2
|
|
231
|
+
- [ ] Per-element language (3.1.2)
|
|
232
|
+
- [ ] A compiled core for the content walker
|
|
233
|
+
- [ ] A GitHub Action
|
|
234
|
+
- [ ] Heading levels beyond H6, cross-page reading order
|
|
235
|
+
|
|
236
|
+
## Contributing
|
|
237
|
+
|
|
238
|
+
The most useful thing you can send is a PDF that outloud gets wrong. A rule is a catalogue entry, a function and a fixture; [`CONTRIBUTING.md`](https://github.com/visionably/outloud/blob/main/CONTRIBUTING.md) has the five-minute version.
|
|
239
|
+
|
|
240
|
+
If outloud found something in your files that a validator passed, a star helps other people find it.
|
|
241
|
+
|
|
242
|
+
## Licence
|
|
243
|
+
|
|
244
|
+
Apache 2.0. Built by [Visionably](https://visionably.ai/research/outloud) and released so that checking a PDF for accessibility costs nothing and runs anywhere.
|