@phun-ky/speccer / a11y
Function: a11y()
ts
function a11y(): void;
Defined in: features/a11y/index.ts:37
Initializes the accessibility elements on the document.
This feature will annotate or highlight accessibility areas like landmarks and region. It can also display tab stops/sequence and any keyboard shortcuts assigned
Returns
void
Example
Use the following code, either for html or js:
html
<div
data-speccer="a11y [shortcuts|tabstops|landmark|headings|autocomplete]"
class="…"
>
…
</div>
ts
const targetElement = document.getElementById('target');
a11y(targetElement);