accessibility bookmarklet

Linaw A11y Checker: A Free Tool That Finds Accessibility Problems on Any Web Page

Efraim Ray Efraim Ray 0 Comments
Developer Tool Showcase

I built Linaw A11y Checker, a free tool that reads a web page the way a screen reader or a keyboard user meets it, then lists every problem it can find with the WCAG rule and a plain-language fix. Paste HTML, open a file, or click a bookmarklet on any live site.

Linaw is Filipino for clarity. Many barangay, LGU, school and small-business sites here quietly lock people out: logos with no alt text, forms with placeholder-only fields, "click here" links and pages that block pinch-zoom. Linaw catches 28 of these problems in seconds, scores the page on an eye chart from 20/200 to 20/20, and gives you a Markdown report you can send to a client or paste into a ticket. Everything runs in your browser.

Type Developer Tool
Stack HTML/CSS/JS
Frontend Vanilla JS + DOMParser
Version v1.0.0
License Free · MIT
Linaw A11y Checker featured image: eye-chart score card and accessibility issue list on a dark background

Try It: Check a Barangay Page

This mini version runs 8 of Linaw's 28 checks right here in the post. Edit the HTML and press Check, or switch to the fixed version and watch the score climb.

efraimray.github.io/linaw-a11y-checker
Linaw A11y Checker
----

    Build Footprint & Quality Checks

    These numbers come from the v1.0.0 build (gzip sizes measured with gzip -c file | wc -c):

    28
    WCAG Checks
    WCAG 2.2 A/AA
    36
    Tests Passing
    Playwright + Chromium
    9.1
    Rule Engine
    KB JS gzipped
    0
    Dependencies
    no framework, no build

    Technology Stack & Architecture Layers

    Logic · JavaScript

    Vanilla JS Rule Engine

    One self-contained function holds all 28 rules, the accessible-name logic, WCAG contrast math, scoring and the Markdown/JSON reports.

    Browser APIs

    DOMParser & Shadow DOM

    DOMParser turns pasted HTML into a document without running it. The bookmarklet draws its panel in a Shadow DOM so site CSS can't break it.

    Markup & Style · HTML/CSS

    Semantic HTML & CSS Tokens

    Labelled controls, landmarks and a skip link (the tool passes its own checks), with light and dark themes from CSS custom properties.

    Testing · Node.js

    Playwright in Chromium

    36 tests cover the sample pages, edge cases like decorative images and large-text contrast, the UI flow and the bookmarklet on a live page.

    Key Architectural Decisions

    Pillar 01

    One Engine, Any DOM

    The rules only need a Document. Pasted HTML becomes one through DOMParser, and a live page already is one, so the checker and the bookmarklet share the same code.

    Pillar 02

    Your HTML Never Runs

    The preview strips scripts, meta refresh and on... handlers, then shows the page in an iframe sandboxed without allow-scripts.

    Pillar 03

    Bookmarklet From Source

    The bookmarklet is built at runtime from the engine's own source with toString(), so it can never drift out of sync with the main tool.

    Pillar 04

    Fair Scoring

    Errors cost 6 points and warnings 2, but each rule counts at most 5 times, so 40 images without alt don't hide every other problem.

    Accessible Names, Contrast Math & the Bookmarklet

    Three real excerpts from the source: how Linaw works out what a screen reader will announce, the WCAG contrast formula, and how the bookmarklet is built from the engine itself.

    // assets/js/linaw-engine.js
    function nameOf(el) {
      var doc = el.ownerDocument;
      var lb = attr(el, 'aria-labelledby');
      if (lb) {
        var parts = lb.split(/\s+/).map(function (id) { var r = id && doc.getElementById(id); return r ? textOf(r) : ''; });
        var joined = trimmed(parts.join(' '));
        if (joined) return joined;
      }
      var al = trimmed(attr(el, 'aria-label'));
      if (al) return al;
      var tx = textOf(el);
      if (tx) return tx;
      return trimmed(attr(el, 'title'));
    }
    // assets/js/linaw-engine.js (WCAG relative luminance)
    function luminance(c) {
      function ch(v) { v /= 255; return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4); }
      return 0.2126 * ch(c.r) + 0.7152 * ch(c.g) + 0.0722 * ch(c.b);
    }
    
    function contrastRatio(a, b) {
      var l1 = luminance(a), l2 = luminance(b);
      var hi = Math.max(l1, l2), lo = Math.min(l1, l2);
      return Math.round(((hi + 0.05) / (lo + 0.05)) * 100) / 100;
    }
    // assets/js/app.js
    function buildBookmarklet() {
      if (typeof linawEngine !== 'function' || typeof linawOverlay !== 'function') return '';
      var code = '(function(){var L=(' + linawEngine.toString() + ')();(' + linawOverlay.toString() + ')(L);})();';
      // Strip block comments and leading indentation to keep the URL short.
      code = code.replace(/\/\*[\s\S]*?\*\//g, '').replace(/^\s+/gm, '').replace(/\n+/g, '\n');
      // encodeURI keeps the URL readable and small; # must still be escaped.
      return 'javascript:' + encodeURI(code).replace(/#/g, '%23');
    }

    Development Roadmap & Milestones

    Version 1.0.0 is released. The next milestones come from the project's roadmap:

    1

    v1.0.0: Checker & Bookmarklet (Released)

    28 WCAG 2.2 checks, eye-chart score, sandboxed preview, Markdown and JSON reports, a bookmarklet with real computed contrast, and 36 automated tests.

    2

    Next: Command-Line Version

    npx linaw https://example.com using Playwright, so whole sites can be checked in CI or before a client hand-over.

    3

    Planned: Before/After Comparison

    Show which issues were fixed, which are new and which are still open between two checks, for progress reports to clients.

    4

    Planned: Filipino & Cebuano Interface

    Translated fixes and labels so LGU and school web admins can read the report in their own language.

    User Interface & Feature Showcase

    E20/200
    F P20/70
    T O Z20/40
    LINAW20/20
    Score

    An Eye Chart for Your Website

    A 0-100 score plus a Snellen line, with counts by severity and WCAG principle.

    ERROR · WCAG 1.3.1 Form field has no label <input type="text" placeholder="Buong pangalan"> Fix: connect a visible <label for="id">. A placeholder is not a label: it disappears when people type.
    Fixes

    Every Problem Comes With a Fix

    The exact HTML, the WCAG rule and a plain-language fix, plus a highlight in the preview.

    Open daily 7 AM to 9 PM

    781 error · 1 warningText contrast is too lowLink text is vague
    Bookmarklet

    Check Any Live Site in One Click

    A panel lists the problems and outlines each one on the real page, using real computed colours.

    Project Links, Code & Documentation

    Open the Live Tool

    Use Linaw in your browser on GitHub Pages and drag the bookmarklet to your bookmarks bar. No sign-up, nothing uploaded.

    Try Linaw

    GitHub Repository

    Browse the source, download the release zip, or suggest a new rule. Free and open source under the MIT license.

    View on GitHub

    How It Was Built

    A plain-language build log: the languages used, every step from idea to tests, and the problems fixed along the way.

    Read the Build Log
    Engineering Takeaway

    A Clearer Web Starts With a Quick Check

    Most accessibility problems are small and cheap to fix once someone points at them. Linaw points at them in seconds and explains the fix in plain words. Want your business, school or LGU website checked and fixed?

    Frequently Asked Questions

    Is Linaw A11y Checker free to use?

    Yes. It is free and open source under the MIT license, so you can use it for your own sites and for client work.

    Does it work with Blogger, WordPress or my hosting?

    Yes. You can paste the HTML of any page or post, and the bookmarklet works on live Blogger, WordPress and custom sites in desktop browsers. The tool itself is a static page, so it runs from GitHub Pages, shared hosting or straight from your computer.

    What do I need to use it?

    Only a modern browser such as Chrome, Edge, Firefox or Safari. Running a check needs no coding skill, but basic HTML knowledge helps when you apply the fixes.

    Is my HTML uploaded anywhere?

    No. The checks run in your browser and nothing is sent to a server. The preview removes scripts and shows your HTML in a sandboxed frame, and your last input is saved only in your own browser.

    How does it check colour contrast?

    For pasted HTML it checks colours set inline, such as style="color:..." or font color, because the page is not rendered. The bookmarklet reads the real computed colours on a live page and skips text on images or gradients, which it cannot measure reliably.

    Can you set this up for my business website?

    Yes. I can check your website with Linaw, test it with a keyboard and a screen reader, and fix the problems I find on WordPress, Blogger or custom sites. Contact me here.

    The barangay and shop pages in the demo are fictional. Automated checks find only part of all accessibility problems, so always finish with a keyboard and screen-reader test.

    Efraim Ray
    Written by

    Efraim Ray

    Software Developer and AI Specialist. BS Information Technology graduate. I pride myself on being conscientious, attentive to detail, and always open to learning — because the best solutions come from listening, taking notes, and exploring what's next.

    Comments