Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 2.30.0 — 2026-11-16

- UI, accessibility, modal, typography, and bug-fix improvements (#182, #183, #184, #185, #186, #187, #188, #189, #190, #191, #192, #193, #194, #195, #196, #197, #199):
- Bundle SIL Open Font License 1.1 variable **Manrope** typeface locally (`dist/fonts/Manrope-VariableFont_wght.ttf` and inline data-URI `@font-face`), and synchronize `fontFamily` changes (`default`, `legible`, `dyslexia-option`) across `.arap-root`, panels, portals, modals, reading mode, playback bar, and accessible tooltips via `activeFont` / `data-arap-font` (#189).
- Add reusable `ModalDialog` and collapsible `FeatureGroup` primitives, default `"experimental"` collapsible group (`smartContrast`, `voiceNavigation`, `translation`), and move search-heavy views (`Profiles`, `Presets`, `Page Navigator`, `Dictionary`, `Keyboard Shortcuts`) into spacious responsive modals (#183, #195, #197).
- Widen default desktop panel to `460px` and add desktop-only (`>= 1024px` fine-pointer) transient pointer + keyboard panel resizing with clamped viewport bounds (#185, #186).
- Fix `.arap-btn-sm` stepper scoping, `.arap-feature-expandable` flex layout, unstyled `.arap-feature-btn`, duplicate search clear icons, duplicate footer close/revert controls, Read-Aloud `44px` mini-player targets, form-field `id`/`name` compliance, and primary blue CTA hierarchy (#182, #184, #191, #192, #196).
- Move Reading Guide and Reading Mask `↑`/`↓` nudge controls out of the panel into external `44px` `<WidgetPortal>` floating buttons (`data-aid="guide"|"mask"`) so mobile/touch users can reposition overlays without reopening the widget panel (#199).
- Expand offline local dictionary glossaries (`"voice"`, `"voice navigation"`, `"read aloud"`, `"translation"`, `"keyboard"`, `"landmark"`, etc.) with fuzzy typo suggestions and truthful empty states (#188).
- Fix host-content translation boundaries (`[data-arap-ui]`, `.arap-root`, `<select>`/`<option>`), BCP-47 subtag normalization, offline multi-language lexicon translation (`[TR] ...`), dynamic DOM observation, live language switching, and visible status banner (#187).
- Harden reading guide and reading mask geometry/z-index isolation (`2147482000`), ignore pointer tracking over widget UI, remove duplicate `document` `keydown` listener, preserve vertical mask position across height changes, preserve CSS gradients under `hideImages`, and expand video embed hiding under `hideVideos` (#193, #194).
- Clean up examples (`examples/basic-usage` and `examples/next-app`) to remove duplicate controllers, group sections cleanly, and include offline SVG and `<video>` media fixtures (#194, #196, #197).

## 2.29.2 — 2026-11-11

- Replace rate-limited Bundlephobia badge in `README.md` with high-reliability edge-rendered `bundlejs` badge.
Expand Down
9 changes: 6 additions & 3 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ https://github.com/prabothcharith/accessibility-plugin
Third-Party Assets & Licensure:
- Zero Runtime Dependencies: This library has no runtime dependencies outside of
peer dependencies on React and React DOM.
- Fonts: No third-party binary font files (.woff, .woff2, .ttf) are bundled. All font
presets utilize client-system font stacks (e.g. system-ui, -apple-system, sans-serif)
with fallback declarations.
- Fonts: The plugin bundles the variable Manrope typeface
(`src/styles/fonts/Manrope-VariableFont_wght.ttf` -> `dist/fonts/Manrope-VariableFont_wght.ttf`
and inlined `@font-face` data URI in JS bundles) as the default UI font,
licensed under the SIL Open Font License 1.1 (`OFL.txt` included alongside
the font asset). Additional font presets (`legible`, `dyslexia-option`)
utilize client-system font stacks with zero external network font requests.
- Icons: All decorative icons are authored directly as inline SVG elements under the
package's ISC License.
- Dictionaries: Built-in glossaries (English, Sinhala, Tamil) are compiled in-tree
Expand Down
6 changes: 4 additions & 2 deletions docs/API.md

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions docs/CSP.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ This guide explains how `accessibility-plugin-react` operates under Content Secu
```
If `data:` is omitted from `img-src`, the browser will fall back to native system cursors.

### D. Bundled Manrope UI Typography (`font-src`)

- **Default UI font:** The library bundles the variable **Manrope** typeface locally (`dist/fonts/Manrope-VariableFont_wght.ttf` for standalone CSS imports, and inlined `data:font/ttf;base64,...` within the runtime injected styles in `dist/index.mjs` / `dist/index.js`) with zero external font CDN calls.
- **Recommended directive:**
```text
font-src 'self' data:;
```
If `data:` is omitted from `font-src`, import `accessibility-plugin-react/style.css` so your bundler serves `dist/fonts/Manrope-VariableFont_wght.ttf` from `'self'`.

---

## 2. Next.js App Router Strict CSP Recipe
Expand All @@ -54,7 +63,7 @@ const cspHeader = `
style-src 'self' 'unsafe-inline';
style-src-attr 'unsafe-inline';
img-src 'self' data:;
font-src 'self';
font-src 'self' data:;
object-src 'none';
base-uri 'self';
form-action 'self';
Expand Down Expand Up @@ -106,7 +115,7 @@ export function middleware(request: NextRequest) {
style-src 'self' 'nonce-${nonce}';
style-src-attr 'unsafe-inline';
img-src 'self' data:;
font-src 'self';
font-src 'self' data:;
base-uri 'self';
form-action 'self';
`
Expand Down Expand Up @@ -159,7 +168,7 @@ For Vite applications, configure CSP headers either through your production web
style-src 'self' 'unsafe-inline';
style-src-attr 'unsafe-inline';
img-src 'self' data:;
font-src 'self';
font-src 'self' data:;
"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand Down
2 changes: 1 addition & 1 deletion docs/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The owner selected the Clean light concept on 2026-10-13. It establishes the def

## Principles implemented

- 400px maximum panel width, rounded border and soft shadow. The panel fits narrow screens, safe areas and existing four placements.
- 460px default desktop panel width (380–720px pointer/keyboard resizable on fine-pointer desktop viewports >=1024px wide; non-resizable and full-bleed responsive down to 320px/400% zoom), rounded border, Manrope default UI typography synced with `fontFamily` presets (`default`, `legible`, `dyslexia-option`), and spacious full-viewport dialogs (`ModalDialog`) for search-heavy views.
- Strong heading with optional supporting description; the close control keeps its accessible name and 44px target.
- Compact label/value rows on desktop. Steppers stack below labels on small screens so neither labels nor targets are squeezed.
- Cohesive decorative SVG icons. Existing names and native controls remain the semantic interface.
Expand Down
18 changes: 9 additions & 9 deletions docs/SECURITY_AUDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ This document provides a comprehensive security review, dependency audit, Conten

## 1. Executive summary and audit results

| Audit Area | Standard / Requirement | Current Verification Result | Status |
| :------------------- | :---------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------ | :------- |
| **Dependencies** | 0 runtime dependencies; peerDependencies only | Clean `package.json`; 0 runtime dependencies. Only peer dependencies: React (`^18.3.1 \|\| ^19.0.0`) and React DOM. | **PASS** |
| **Vulnerabilities** | `npm audit` 0 findings across direct and transitive tooling | `npm audit` returns 0 vulnerabilities across all installed packages. | **PASS** |
| **Script Injection** | No dynamic code execution (`eval`, `new Function`) | Automated AST scan verifies 0 instances of `eval` or `Function` constructors across all `src/` modules. | **PASS** |
| **Network Requests** | No unauthorized telemetry, tracking, or background calls | 0 `fetch()`, 0 `XMLHttpRequest`, 0 `navigator.sendBeacon`, 0 `WebSocket` calls. | **PASS** |
| **Data Residency** | All state stored locally; zero external exfiltration | Preferences persist strictly in `localStorage` under `react-accessibility-plugin:state`. Zero cloud sync. | **PASS** |
| **Licensing** | Permissive ISC license; clean IP attribution | Dedicated `LICENSE` and `NOTICE` files committed; zero GPL/copyleft or proprietary binary assets. | **PASS** |
| Audit Area | Standard / Requirement | Current Verification Result | Status |
| :------------------- | :---------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
| **Dependencies** | 0 runtime dependencies; peerDependencies only | Clean `package.json`; 0 runtime dependencies. Only peer dependencies: React (`^18.3.1 \|\| ^19.0.0`) and React DOM. | **PASS** |
| **Vulnerabilities** | `npm audit` 0 findings across direct and transitive tooling | `npm audit` returns 0 vulnerabilities across all installed packages. | **PASS** |
| **Script Injection** | No dynamic code execution (`eval`, `new Function`) | Automated AST scan verifies 0 instances of `eval` or `Function` constructors across all `src/` modules. | **PASS** |
| **Network Requests** | No unauthorized telemetry, tracking, or background calls | 0 `fetch()`, 0 `XMLHttpRequest`, 0 `navigator.sendBeacon`, 0 `WebSocket` calls. | **PASS** |
| **Data Residency** | All state stored locally; zero external exfiltration | Preferences persist strictly in `localStorage` under `react-accessibility-plugin:state`. Zero cloud sync. | **PASS** |
| **Licensing** | Permissive ISC license + SIL OFL 1.1 font attribution | Dedicated `LICENSE` and `NOTICE` files committed; bundles SIL OFL 1.1 `Manrope-VariableFont_wght.ttf` with zero GPL/copyleft or proprietary binary assets. | **PASS** |

---

Expand Down Expand Up @@ -78,6 +78,6 @@ Features that inspect or transform DOM elements (such as host translation, read
- **License**: Released under the open-source **ISC License** (permissive, GPL-compatible).
- **Attribution**: Derived from the original vanilla JavaScript accessibility plugin; attribution is documented in `NOTICE` and `README.md`.
- **Assets**:
- **Fonts**: No binary font files (`.woff`, `.woff2`, `.ttf`) are bundled. Presets rely entirely on standard system font stacks.
- **Fonts**: Bundles the open-source variable **Manrope** font (`Manrope-VariableFont_wght.ttf`) under the **SIL Open Font License 1.1** (`dist/fonts/OFL.txt` and `NOTICE`), with offline client-system fallback stacks for legible and dyslexia presets. Zero external Google Fonts or remote CDN requests.
- **Icons**: Authored in-tree as native inline SVG icons under ISC.
- **Glossary Data**: Built-in dictionary entries (English, Sinhala, Tamil) are compiled in-tree under ISC for offline accessibility lookup.
Loading