How to install the Evolving Accessibility Widget

One piece of code in the head of every page. On most platforms you can add it in the site settings, without a developer.

Before you start

  • Your site key: it is in your order confirmation e-mail and in My Account under Sites.
  • The address of your accessibility statement. Write one with our accessibility statement generator if you do not have one yet.
  • Whether your website sends a Content Security Policy. Ask your developer or host if you are not sure.

Your installation code

Replace YOUR-SITE-KEY with your site key and the statement address with your own.

<script src="https://ada-expert-web.vercel.app/widget/v1/evolving.js"
        data-site-key="YOUR-SITE-KEY"
        data-position="left"
        data-lang="auto"
        data-statement-url="https://example.com/accessibility-statement/"
        async></script>

Settings you can add to the code
AttributeValuesDefault
data-site-keyYour site key: letters, digits, hyphens and underscores, up to 64 characters. It works only on the website addresses of your planRequired: without your own key the button is not shown
data-positionleft or rightleft
data-langauto, or a language code such as en or esauto: the visitor's choice, else your page's language
data-statement-urlThe address of your accessibility statementNone: the Accessibility Statement link is not shown
data-feedback-urlA mailto: or https: address where visitors can report barriersNone: the Send Feedback link is not shown
data-offset-x, data-offset-yDistance of the button from the corner, 0 to 200 pixels20 (12 on small screens)
data-colorA #rrggbb color on which white text has a contrast of at least 4.5:1 (others are ignored)#0048ff
data-shortcutalt+shift+a, or off (also turns off Alt+Shift+R, which reads aloud from the focused element)alt+shift+a
data-mobileshow or hide (the button only: saved adjustments still apply)show
data-text-scale-modezoom, or root for websites whose text sizes are all set in remzoom

Visitors' own choices (language, side and panel size) always win over these settings.

Where to paste it

In the <head> of every page: saved settings then apply as early as possible. Just before </body> works too.

If your pages show other pages of your own website in frames, add the code to those pages as well: settings do not reach into frames.

Step by step, by platform

Menus change: if a step looks different, follow the platform's current help article linked in each section.

WordPress

  1. With a plugin: install a plugin that adds code to the site header (search the plugin directory for “header and footer code”), paste the code into its header field and save.
  2. Or with a child theme: add the code to the wp_head action in your child theme's functions.php, as in the example below. Never edit the parent theme: its updates overwrite your changes.
  3. If you use a caching or optimization plugin, exclude widget/v1/evolving.js from its “delay JavaScript” and “combine JavaScript” options, then clear its cache.
<?php
// In your child theme's functions.php (never in the parent theme)
add_action( 'wp_head', function () {
	?>
	<script src="https://ada-expert-web.vercel.app/widget/v1/evolving.js"
	        data-site-key="YOUR-SITE-KEY"
	        data-statement-url="<?php echo esc_url( home_url( '/accessibility-statement/' ) ); ?>"
	        async></script>
	<?php
} );

WordPress.com websites need a plan that allows plugins or theme code.

Shopify

  1. In your Shopify admin, go to Online Store, then Themes. Next to your current theme, open the actions menu and choose Edit code.
  2. Open layout/theme.liquid, paste the code just before </head> and save.
  3. Repeat these steps whenever you publish a different theme.

Shopify's checkout pages do not load theme code, so the widget does not appear there.

Wix

  1. In your site's dashboard, go to Settings and choose Custom Code (under Development & integrations).
  2. Choose Add Custom Code, paste the code, choose All pages and Load code once, place it in Head, and apply.

Custom code needs a Premium plan with a connected domain.

Squarespace

  1. Open Code Injection in your site's settings (its place in the menu differs between dashboard versions: search the dashboard for “code injection”).
  2. Paste the code into the Header field and save.

Code injection is available on the Core, Plus and Advanced plans and some older plans.

Plain HTML and frameworks

  1. Paste the code into the <head> your pages share: a common header include, or the base layout of your framework (for example the root layout in Next.js, baseof.html in Hugo or the base layout in Eleventy).
  2. Keep the data- attributes as they are; frameworks pass them through.

Google Tag Manager (optional)

  1. Create a Custom HTML tag with the code and the trigger All Pages, then publish the container.
  2. Tags load later than code in your theme, so saved settings apply a little later: prefer your theme or platform when you can.

Content Security Policy

If your website sends a Content-Security-Policy header, add ADA-Expert's address to these directives, next to the sources they already list:

script-src https://ada-expert-web.vercel.app;
connect-src https://ada-expert-web.vercel.app;
font-src https://ada-expert-web.vercel.app;
img-src https://ada-expert-web.vercel.app;

The widget needs no 'unsafe-inline', no 'unsafe-eval' and no data: sources. It loads files only from that address and sets no cookies.

Check the installation

  • The accessibility button appears on every page, in the corner you chose.
  • It opens with Enter, the Tab key stays inside the panel, and Escape closes it.
  • The Accessibility Statement link in the panel opens your own statement.
  • The browser console shows no errors that start with [Evolving].
  • Everything also works on a phone.

Troubleshooting

The button does not appear
Check that the code has your own site key instead of YOUR-SITE-KEY, that the website address matches the one on your plan (My Account → Sites) and that your plan is active; clear the cache of your caching or optimization plugin and exclude the script from JavaScript optimization; check that your Content Security Policy allows the widget; and make sure the code is pasted only once. The browser console explains the reason in a line that starts with [Evolving].
Settings do not apply inside embedded frames
Add the code to the pages inside the frames that you control. The widget cannot reach into frames from other websites.
Text does not get larger
If your website sets every text size in rem, add data-text-scale-mode="root" to the code.

Remove the widget

Delete the code from your website. Your visitors' saved adjustments stop applying at once.

What the widget does not do

The Evolving Accessibility Widget lets visitors adjust how your website looks and reads: text size, spacing, contrast, color, motion, focus outline and read-aloud. It does not change your website's code and does not, by itself, make a website conform to WCAG or meet the ADA. Conformance comes from an accessibility audit and fixes to the code, which ADA-Expert also provides.

Questions about the widget, an audit or code fixes? Talk to ADA-Expert.