HTML Rules
Under the hood, most of the accessibility checks ran by Ace are powered by Deque axe, an engine for automated testing of HTML. Ace uses axe’s rules, with some modifications (described here).
Rules
Here is a list of axe’s rules used by Ace (see the full up to date documentation in GitHub ):
Rule ID | Description |
---|---|
accesskeys | Ensures every accesskey attribute value is unique |
aria-allowed-role | Ensures role attribute has an appropriate value for the element |
aria-dialog-name | Ensures every ARIA dialog and alertdialog node has an accessible name |
aria-text | Ensures "role=text" is used on elements with no focusable descendants |
aria-treeitem-name | Ensures every ARIA treeitem node has an accessible name |
empty-heading | Ensures headings have discernible text |
epub-type-has-matching-role | Ensure the element has an ARIA role matching its epub:type |
frame-tested | Ensures <iframe> and <frame> elements contain the axe-core script |
frame-title-unique | Ensures <iframe> and <frame> elements contain a unique title attribute |
heading-order | Ensures the order of headings is semantically correct |
identical-links-same-purpose | Ensure that links with the same accessible name serve a similar purpose |
image-redundant-alt | Ensure image alternative is not repeated as text |
label-title-only | Ensures that every form element is not solely labeled using the title or aria-describedby attributes |
landmark-banner-is-top-level | Ensures the banner landmark is at top level |
landmark-complementary-is-top-level | Ensures the complementary landmark or aside is at top level |
landmark-contentinfo-is-top-level | Ensures the contentinfo landmark is at top level |
landmark-main-is-top-level | Ensures the main landmark is at top level |
landmark-no-duplicate-banner | Ensures the document has at most one banner landmark |
landmark-no-duplicate-contentinfo | Ensures the document has at most one contentinfo landmark |
landmark-no-duplicate-main | Ensures the document has at most one main landmark |
landmark-one-main | Ensures the document has a unique main landmark |
landmark-unique | Landmarks should have a unique role or role/label/title (i.e. accessible name) combination |
meta-viewport-large | Ensures <meta name="viewport"> can scale a significant amount |
meta-viewport | Ensures <meta name="viewport"> does not disable text scaling and zooming |
page-has-heading-one | Ensure that the page, or at least one of its frames contains a level-one heading |
presentation-role-conflict | Flags elements whose role is none or presentation and which cause the role conflict resolution to trigger. |
region | Ensures all page content is contained by landmarks |
scope-attr-valid | Ensures the scope attribute is used correctly on tables |
skip-link | Ensure all skip links have a focusable target |
tabindex | Ensures tabindex attribute values are not greater than 0 |
table-duplicate-name | Ensure that tables do not have the same summary and caption |
Developer note: regular expression replace all: (\| .+? \| .+? \|) .+? \| .+? \| .+? \| .+? \|
=> $1
Modifications
Certain aspects of HTML accessibility checking don’t apply to EPUBs, so Ace has modified axe’s default ruleset slightly.
- Ace disables axe’s
bypass
,region
,page-has-heading-one
, andlandmark-complementary-is-top-level
rules. - Ace changes axe’s
landmark-one-main
rule to add thepage-no-duplicate-main
check (washas-no-more-than-one-main
, see https://github.com/dequelabs/axe-core/blob/develop/CHANGELOG.md#300-2018-03-19 ). - DAISY Axe fork: https://github.com/daisy/axe-core/pull/6