# Changelog

`@lasmind/website-accessibility-core` and `@lasmind/website-accessibility` share one version number.

## 0.2.3

- **Fix: "Take the colour check" did nothing on other websites.** The panel listens for clicks on its root, and the check handler looked at `event.currentTarget` (always that root, never the link), so it called `preventDefault()` on the real `https://lasmind.com/tools/color-blind-test` link. It now checks the clicked element: the link opens the free LasMind colour check in a new tab. The "Take the check" and "Retake" buttons open it too when no `onOpenCheck` handler is set.
- New widget options `checkUrl` (web component: `check-url`) to send visitors to your own page, and `onOpenCheck(event)` to handle it yourself (call `event.preventDefault()`).
- **Header redesign.** The logo sits beside one text block, with the title and description sharing one left edge and centred on the logo. Reset and Close sit on the right of the title row, and the description can use the full width under them, so it stays on one line in the 400px drawer. Below about 340px, Reset becomes an icon button (its name is kept for screen readers).
- **Text size moves 10% per click**: 90, 100, 110, 120, 130, 140, 150% (it was 90, 100, 115, 130, 150). Saved sizes from older versions round to the nearest step, and a tie rounds up, so 115% becomes 120%. The early-paint script (`createInitScript`) rounds the same way.
- **A- / A / A+:** the end segments follow the pill's rounded corners, so the focus ring, hover and pressed states are no longer square at the ends.
- `check:a11y-widget` now also checks the header geometry (desktop and 360px), the colour check link opening in a new tab, `checkUrl`, `onOpenCheck`, the 10% steps and the rounded segments, with before (0.2.2) and after screenshots.

## 0.2.2

- **Fix: the menu was unstyled when installed from npm.** The widget mounts the menu inside its shadow root, but the shared panel stylesheet was added to `document.head`, which a shadow root cannot see. Sites got raw buttons, radios and blue links unless they called `ensurePanelStyles(shadowRoot)` by hand. The widget now adds the stylesheet into its own shadow root, and `mountPanel()` puts it in whichever root holds the container (`getRootNode()`).
- `ensurePanelStyles()` is idempotent, also accepts an element, and stays exported (core and widget) so old workarounds keep working.
- New `placement: "floating" | "inline"`: inline puts the button inside `container` as a normal element (header toolbars); the menu stays a fixed drawer.
- New `size: "sm" | "md"` (36px / 52px) and `label`.
- New `trigger: false` to use your own button, with `toggle()`, `isOpen()` and `element` on the handle. Focus returns to the element that opened the menu. `open()` and `close()` are now idempotent.
- Theming without CSS injection: `part="trigger"`, `part="trigger-dot"`, `part="frame"`, and `--lm-a11y-trigger-bg`, `--lm-a11y-trigger-ink`, `--lm-a11y-trigger-size`, `--lm-a11y-trigger-border`, `--lm-a11y-trigger-radius`, `--lm-a11y-trigger-shadow`.
- Web component attributes `placement`, `size`, `trigger="off"`, `label`; script tag `data-size`.
- README: fixed the CDN file name (`dist/website-accessibility.min.js`), and added Next.js, React, own-button and theming examples.
- New check: `npm run check:a11y-widget` packs both packages, installs them in a temp project and tests the widget in headless Chromium.
- **Upcoming licence change.** 0.2.0 and every earlier version stay MIT. From 0.3.0, both packages move to the LasMind Commercial License: free for personal, non-commercial use; commercial or production use needs a license. See <https://lasmind.com/legal/lasmind-vision-license> or contact <https://lasmind.com/contact-us?interest=lasmind-vision-license#enquiry>.
- Shows the installed version at the bottom of the menu, exported as `VERSION`. New opt-in `updateCheck` option (`update-check` attribute, `data-update-check` on the script tag): a newer version is logged to the console and shown in the menu on localhost only.
- Help area: the support invitation is now its own card (linking to <https://lasmind.com/tools/lasmind-vision/support>), separate from two rows: "Commercial license" (opens the licence terms) and "Talk to sales" (opens the contact form with LasMind Vision preselected).

## 0.2.0

- One shared feature list (`FEATURES`, `groupsFor`, `displayFeatures`) and design tokens (`A11Y_TOKENS`, `tokensCss`) used by the LasMind website menu, this widget and the LasMind Vision extension.
- Widget: LasMind brand colours (accent #b00020 light / #ff8a80 dark), shared focus ring, icons, vision hint and selected-type description.
- Extension and both packages now share one version (scripts/sync-a11y-version.mjs).

## 0.1.0

- First release: settings schema v2 (with migration from earlier LasMind website and extension data), colour vision correction, text size, contrast, link underlines, text spacing, reduced motion, focus indicators, read aloud (English, Hindi beta, Tamil beta), spoken auto guide, and the colour vision screening engine.
- Public page: https://lasmind.com/tools/lasmind-vision . Colour vision test: https://lasmind.com/tools/color-blind-test .
