@ariada-org/overlay
v0.2.0
Published
Fully abstract in-page finding overlay: the engine resolves findings to live element rectangles; a pluggable painter decides what is drawn (boxes, connector lines to blocks, or a mascot that flies element to element — Dracula, Thumbelina, anyone).
Maintainers
Readme
@ariada-org/overlay
A fully abstract in-page overlay for accessibility findings. The engine only
resolves findings ({selector, severity, message}) to live element rectangles
and keeps them attached on scroll/resize. What is drawn is a pluggable
painter — you register your own:
box— outlined boxes per element (severity-coloured)line— connector lines from a side rail to each block- a mascot — a character that flies element to element; the glyph is a
parameter, so Dracula (
🧛, draculascan), Thumbelina (🧚), or any future visual is a one-linemakeMascotPainter({ glyph }).
import { createOverlay, registerPainter } from '@ariada-org/overlay';
import '@ariada-org/overlay/painters'; // box · line · dracula · thumbelina
const ov = createOverlay(document);
ov.show(findings, 'dracula'); // by id
ov.focus(2); // fly to the 3rd finding
// drop in anything: registerPainter({ id:'mine', paint(anchors, layer){ ... } })Works in any page context — a browser-extension content script (live site),
a DOM snapshot, or a proxied page. See demo.html.
