Skip to content

Self-hosting

Self-hosting serves the widget from your own infrastructure. Download the ready-to-use files from the latest GitHub release; no build step or npm installation is required. First compare the three bundle variants and select the font behavior that fits your site.

Copy accessibility-widget.min.js to a directory served by your website. It has no accompanying files; optional reading fonts are requested from external font providers only if selected.

<script src="/assets/accessibility-widget.min.js" defer></script>

Copy accessibility-widget.embedded-fonts.min.js to your public assets. Its optional fonts are included in the script, so there are no separate font files or font-provider requests. The script download is larger.

<script src="/assets/accessibility-widget.embedded-fonts.min.js" defer></script>

Copy the entire self-hosted/ directory from the release. It contains the script, fonts/ files, and third-party license notices. Preserve the directory structure and deploy all of it:

/assets/self-hosted/accessibility-widget.min.js
/assets/self-hosted/fonts/...
<script src="/assets/self-hosted/accessibility-widget.min.js" defer></script>

Serve the selected script over HTTPS with a JavaScript content type. Add the script and, for option 3, its font files to your normal deployment and cache invalidation process. Do not include more than one variant on a page.

To build from the current source checkout, use Node.js 22.23.4 or newer:

Terminal window
npm ci
npm run build

Copy dist/accessibility-widget.min.js, dist/accessibility-widget.embedded-fonts.min.js, or the complete dist/self-hosted/ directory. The build output is generated and is not committed to the repository.

To update the hosted bundle, download the desired file from the latest GitHub release and replace it as part of a deployment. When using long-lived caching, use a versioned filename or update your cache policy so browsers do not keep an older bundle indefinitely.