Below is a list of layers that are used in QUAIL, lowest first.
DOM Layer
Based on the PHP DOM object collection. The DOM can come from an HTML string, URI, or file.
CSS Layer
Builds an indexed collection of the CSS which describes the page so we can do things like test for color luminosity.
Test Layer
These are generalized tests based on the Open Accessibility Tests, the test layer is a collection of swappable tests that extend a base test class. There are some other helper classes which are built on the test class to support things like tables.
Test objects always fill reports in a general reporting object that contains either a pass/fail, or a collection of actual DOMElement objects which can be used by the reporting layer later.
Guideline Layer
A thin layer which associates a guideline (WCAG AAA, 508, etc), with a collection of tests.
Reporting Layer
Collects all the DOM objects and generates reports. These are right now just a collection of reporting objects, but will be able to generate XML, marked up pages, or HTML reports. Even more reporting can be scaffolded on these layers.
Translation
The reporting layer can use multiple translations, which will be either a DB layer or PO files layer. This lets you customize the reporting errors generated by QUAIL.