A11Y_REQUIREMENTS
re-export| Package | @formscript/a11y |
|---|---|
| Specification | 13, 13.3 |
| Depends on | ast, types |
@formscript/a11y
Accessibility metadata, per §13 of the specification.
The requirements
Fifteen requirements, each traced to the section of the specification that states it:
import { A11Y_REQUIREMENTS } from '@formscript/a11y';
for (const requirement of A11Y_REQUIREMENTS) {
requirement.id; // 'a11y-3'
requirement.section; // '§13.3'
requirement.text;
}
The accessible tree
buildAccessibleTree turns a document into the tree a screen reader needs:
each field with its role, its accessible name, its description, and the
relationships between them.
The error summary
The error summary is part of the contract, not a convenience: it must exist,
it must be reachable from the first invalid field, and it must list the errors
in document order. buildErrorSummary produces it.
Public API
35 exported symbols.
A11yCheckOptions
interfaceA11yRequirement
interfaceA11yRequirementId
typeA11yViolation
interfaceAccessibleNode
interfaceAccessibleOption
interfaceAccessibleRole
typeAccessibleTreeOptions
interfacebuildAccessibleTree
re-exportbuildCatalogue
functionbuildErrorSummary
re-exportcheckA11y
re-exportCHOICE_SELECT_THRESHOLD
re-exportcollectEntities
function
The entities of the form body; namespace bodies belong to other documents (§4.4).
Entity
interfaceEntityKind
typeERROR_SUMMARY_ID
re-exportErrorSummary
interfaceErrorSummaryEntry
interfaceErrorSummaryOptions
interfaceFieldError
interfacefindAccessibleNode
re-exportflattenEntities
functionflattenRenderable
function
Every entity that renders, in document order; a `state` subtree renders nothing (§7.1).
isDataBearing
functionisRenderable
function
A `state` declaration is not an entity and renders nothing (§7.1).
OptionSpec
interfacereadOptions
functionRepeatInfo
interfaceresolveBoolean
functionresolveCatalogueValue
function
Locale fallback chain of §12.4: exact locale, language only, `default`.
resolveNumber
functionresolveText
function
`undefined` means the text is not statically resolvable; `''` means it resolves to nothing.
TextCatalogue
interface