CaseLeaf

Handbook / The `access` command

The access command

A tender requires every document you submit to be usable by somebody with a screen reader, and you have ninety pages of appendices that nobody has ever checked.

Checks a document against what a screen reader needs, and reports only what is missing. It exists because accessibility faults are invisible to the person who made the document: a heading that is bold rather than tagged, a form field with no label, a sheet of scanned text that reads as an empty page. Reach for it before a document goes to somebody you cannot watch reading it. It matters just as much on a compliance pass, because an invented finding costs as much as a missed one, and this reports nothing when there is nothing wrong.

How you run it

caseleaf access report.pdf

What each part means

In full, every part it will take:

caseleaf access <file>

The document, and nothing else.

Tagging, language, title, unreadable sheets and fields with nothing to announce.

What comes back

Asked of a short sample document, it answers as below. The sample has eight sheets, a highlight and a note left by a reviewer, a web link, a small table, two pictures and one form field already filled in.

{
  "byRule" : [
    {
      "count" : 3,
      "rule" : "field-unlabelled"
    },
    {
      "count" : 1,
      "rule" : "title-not-shown"
    },
    {
      "count" : 1,
      "rule" : "untagged"
    }
  ],
  … and the rest of the answer

The same thing from AppleScript

Everything above can be asked for from a script instead. There is one AppleScript command, perform: on names the document, and options takes the rest exactly as you would type it.

tell application "CaseLeaf"
    perform "access" on "/path/to/report.pdf"
end tell

All the commands · Asking from a script · Contents