Skip to main content

Open the Accessibility Panel From Your Own Link or Button

You don't have to use the floating accessibility button. Add one attribute to any link or button on your site and it opens the AllAccessible panel. Th

Written by Frank

Open the Accessibility Panel From Your Own Link or Button

Overview

You don't have to use the floating accessibility button. Add one attribute to any link or button on your site and it opens the AllAccessible panel. Then hide the floating button from your dashboard. Keyboard support, screen-reader labels, and focus handling are taken care of for you.

Typical use: an "Accessibility" link in your site footer, next to Privacy and Terms.

Who This Is For

  • Agencies and designers who don't want a floating button on client sites

  • Sites with a strict visual design or an existing footer link for accessibility

  • Developers who want to open the panel from their own code

What You'll Learn

  • How to make any link or button open the panel

  • How to hide the floating button everywhere

  • What happens for keyboard and screen-reader users

  • The JavaScript API for developers


Before and After

Site with the default floating accessibility button in the bottom-right corner and an Accessibility link in the footer

Before: the floating button and your footer link both exist.

Same site with no floating button; only the footer Accessibility link remains

After: the floating button is hidden. The footer link is the way in.


Step 1: Add the Attribute to Your Link or Button

Add data-aacx-open to the element you want to use. It works on links, buttons, or any other element.

<a href="#accessibility" data-aacx-open>Accessibility</a>

<button type="button" data-aacx-open>Accessibility options</button>

That's all the markup you need. The widget finds the attribute on its own, including on elements that appear after the page loads (single-page apps, Turbo, lazy-loaded footers).

What the widget adds for you

  • Clicking opens the panel. Clicking again closes it.

  • Enter and Space work from the keyboard.

  • The element is announced to screen readers as a control that opens a dialog, with its open/closed state kept current.

  • When the panel closes, focus returns to your link, so keyboard users don't lose their place.

Accessibility panel open on the right side of the page after clicking the footer link

Clicking the footer link opens the panel. With no floating button, it opens in its default position.

Footer Accessibility link showing a focus ring after the panel was closed with Escape

After closing with Escape, focus is back on the footer link.


Step 2: Hide the Floating Button

  1. Open the site, then Widget Settings

  2. Scroll to Trigger visibility

  3. Tick "I use my own link or button. Hide the floating button everywhere."

  4. Save

Changes reach your site within about an hour. To see it sooner, open any page of your site with ?aacx-reset on the end of the address.

Important: With the floating button hidden, visitors can only open the panel through your link. Make sure the link is on every page, including landing pages and checkout flows that use a different template.

You can also leave the floating button on and add the attribute to a footer link as a second way in. Both work at the same time.


For Developers: JavaScript API

Once the widget has loaded, these are available on every page:

window.AllAccessible.open()      // open the panel
window.AllAccessible.close()     // close it
window.AllAccessible.toggle()    // open if closed, close if open
window.AllAccessible.isOpen()    // true or false

Pass the element that triggered the call to open() or toggle() and focus returns to it when the panel closes:

myButton.addEventListener('click', () => window.AllAccessible.open(myButton));

The page receives two events on window:

window.addEventListener('aa:widget:opened', () => { /* panel opened */ });
window.addEventListener('aa:widget:closed', () => { /* panel closed */ });

Please don't open the panel by clicking the widget's own button from script, or by targeting its ids and classes. Those are internal and change between releases. The data-aacx-open attribute and the API above are stable.


Troubleshooting

The link doesn't open anything

  • Check the attribute is spelled exactly data-aacx-open

  • Confirm the widget script is installed on that page (view source, search for allaccessible)

  • Check the browser console for errors from other scripts that stop clicks from reaching the page

The floating button is still showing

  • Wait up to an hour after saving, or load the page with ?aacx-reset

  • Make sure you saved the setting on the right site or subdomain

Focus doesn't return to my link

  • Focus returns to the element that opened the panel. If your own script opened it, pass that element to open().

I hid the button and now visitors can't find the panel

  • Add data-aacx-open to a link on every page template, or untick the setting to bring the floating button back.


Related Articles


Last Updated: November 2026
​Attribute: data-aacx-open
​Dashboard setting: Widget Settings → Trigger visibility
​Update Time: Up to 1 hour propagation

Did this answer your question?