Skip to content

Creating a PR: Building and previewing documents

Mike Gower edited this page May 13, 2024 · 1 revision

Document build

You can build the understanding and technique documents locally.

The main spec is done separately (with Respec), this is only for the informative docs.

Installing

There are two methods of installing the appropriate software:

1. Raw install

Firsly install Java.

Then install Apache Ant and make sure it works. Help page for MacOS

E.g. typing at the command-line: # ant -version Should show version info.

2. Homebrew (Mac OS specific)

  1. Install homebrew
  2. Install OpenJDK
  3. Install ant

Building the documents

From the base WCAG directory (the one containing build.xml) type "ant -projecthelp" to get a list of commands you can run. E.g., ant understanding generates the Understanding, and ant techniques generates the Techniques. It will generate them into the "output" directory, plus some intermediate files a few other places.

You can type antclean to remove stray build files. It will overwrite a couple files from the repository; normally you shouldn't commit, instead type git reset --hard after ant clean.

That should cover most of what you might need to do with the generator.

Creating previews of Informative Docs

If you have a PR for understanding or technique document, the best way to create a preview is:

  1. Copy the branch name from the PR.

  2. Go the main code page, and use the branch name to filter to the branch you need.

Screenshot from the code page showing the drop-down under the branch selector.
  1. Navigated through the code files to find the correct file. E.g. Understanding > 2.2 > dragging-movements.html

  2. Copy the URL of that page.

  3. Go to https://raw.githack.com/ and put the URL into the top box.

  4. Copy the URL from the "Use this URL for development" box.

  5. Use that URL for the preview.