@lasmind/website-accessibility-core
v0.2.3
Published
LasMind Vision accessibility engine: colour blind filters (daltonize), text size, high contrast, read aloud and a colour vision screening. No framework and no network calls.
Maintainers
Readme
LasMind Vision – Accessibility Widget Engine
The accessibility engine behind the LasMind Vision website menu, the LasMind Vision browser extension and @lasmind/website-accessibility. No framework, no network calls.
Most sites want the ready-made menu: use @lasmind/website-accessibility. Use this package to build your own UI.
npm install @lasmind/website-accessibility-coreimport { createPageApplier, normalizeSettings, withPatch } from "@lasmind/website-accessibility-core";
const applier = createPageApplier(document);
let settings = normalizeSettings(JSON.parse(localStorage.getItem("my-a11y") ?? "null"));
settings = withPatch(settings, { vision: "deuteranopia", underlineLinks: true });
applier.apply(settings);
localStorage.setItem("my-a11y", JSON.stringify(settings));What is included
settings: one schema for every feature,normalizeSettings(also reads older LasMind data),withPatch.vision: colour correction (daltonize) matrices for protanopia, deuteranopia and tritanopia, with a strength from 0 to 1, plus greyscale.apply:createPageApplierinjects the CSS into the page and open shadow roots.rootAttributesandcreateInitScriptare for sites that style themselves from<html>attributes.speech: read aloud with the browser's own voices (createSpeaker,createReadAloud), including Hindi and Tamil when the device has those voices.guide: spoken step-by-step guidance (createGuide).@lasmind/website-accessibility-core/screening: the colour vision screening engine and plate renderer. On the LasMind site it is shown at lasmind.com/tools/color-blind-test. It checks one eye at a time for red-green colour differences.
The screening is a screening, not a medical diagnosis. If you show it, say so to your users, and treat results as health data under your privacy policy. This engine is a preference menu, not a way to claim a site is WCAG or ADA compliant.
Learn more about accessibility at the W3C Web Accessibility Initiative.
License
- Versions 0.2.0 and earlier: MIT, by LasMind Technologies. Those MIT rights are permanent.
- Version 0.3.0 onward: LasMind Commercial License. Free for personal, non-commercial use. Commercial or production use by an organization needs a license.
Full terms: https://lasmind.com/license. For a commercial license, talk to sales at https://lasmind.com/contact-us?interest=lasmind-vision-license#enquiry or [email protected].
