On this page
What this issue is
ARIA (Accessible Rich Internet Applications) is a set of attributes that describe elements to assistive technology such as screen readers. It changes what is announced. It does not change how an element behaves. Two mistakes are very common.
1. role="button" on a link. An <a href> announced as a button promises that Space will activate it. A link only responds to Enter, so the promise is broken. A link that goes to another page should be announced as a link.
2. aria-hidden="true" on a focusable element. aria-hidden removes an element from what screen readers can read. It does not remove it from the tab order. A keyboard user lands on a button or field that the screen reader says does not exist, so focus goes to silence.
<!-- Link announced as a button -->
<a href="/book" role="button">Book a call</a>
<!-- Hidden from screen readers but still focusable -->
<div aria-hidden="true">
<button>Start free trial</button>
<a href="/pricing">Pricing</a>
</div>Why it costs you leads or sales
People using screen readers, voice control or a keyboard meet your forms, booking buttons and checkouts through these roles. When the role is wrong, they do not know what a control does or cannot reach it. Some will leave. Others will not be able to finish at all.
A hidden but focusable button inside a slide-out menu or an old popup is a common trap. Focus lands there, nothing is announced, and the visitor loses their place on the page. Voice control users can also fail to say the name of a control if its role and label disagree.
There is also a legal and reputational side. These patterns fail WCAG 2.2 success criterion 4.1.2 (Name, Role, Value), and automated testers report them, so they show up in accessibility audits that buyers and procurement teams may run.
- Landing pagePage loads and reads fine
- Tab to Book buttonInside aria-hidden container, so nothing is announced
- Booking formUser unsure what they activated
- Lead submittedNever reached
A hidden-but-focusable button breaks the path to the form.
How to check if your site has it
Run an automated accessibility scan
Use a browser-based checker such as the axe DevTools extension, Lighthouse (Accessibility category in Chrome DevTools) or WAVE. Look for the rules named aria-hidden-focus and aria-allowed-role, and for roles flagged as not allowed on that element.
Search your HTML for the patterns
Open View Source or DevTools and search for role="button" next to an <a href> and for aria-hidden="true". For each aria-hidden match, check whether anything inside it can take focus (links, buttons, inputs, tabindex).
Tab through the page
Press Tab repeatedly with a mouse set aside. If focus disappears, or lands on something you cannot see, there is likely a hidden focusable element.
Test a link with the Space key
Focus any element with role="button" that is really a link and press Space. If the page scrolls instead of acting, it is a link dressed as a button.
Listen with a screen reader
Try NVDA or VoiceOver on your key journeys (forms, booking, checkout). Note anything announced with the wrong type or skipped.
How to fix it
The rule of thumb: use the native element that matches the behaviour. If it goes to a new URL, use a link. If it runs an action on the page (open a menu, submit, add to cart), use a button. Then make sure anything hidden is truly unreachable.
<!-- Navigates: keep it a link, drop the role -->
<a href="/book" class="btn">Book a call</a>
<!-- Acts on the page: use a button -->
<button type="button" class="btn" id="open-chat">Chat with us</button>
<!-- Hidden panel: inert removes it from tab order and screen readers -->
<div id="menu" hidden>
<button>Start free trial</button>
</div>
<!-- Or keep it visible but unreachable while a modal is open -->
<main inert>...</main>Find the source
Run axe on the page and note the selector. Check whether the markup comes from your theme, a page builder or a plugin.
Edit the element
In Elementor, Divi or the block editor, open the button or link widget. Remove any custom role attribute from Advanced settings or the HTML anchor field. For link buttons, keep the link type.
Fix theme templates
For hard-coded markup, use a child theme and edit the template file in Appearance > Theme File Editor, or ask the theme author for a fix. Avoid editing a parent theme directly, as updates overwrite changes.
Open the theme code
Go to Online Store > Themes > Edit code (duplicate the theme first as a backup).
Search the files
Use the search box for role="button" and aria-hidden. Check sections, snippets and layout/theme.liquid.
Replace and test
Change link buttons to plain <a> tags and action controls to <button type="button">. For app-injected markup, contact the app developer.
Check for injected HTML
Open Tags and look for Custom HTML tags that add popups, banners or chat buttons.
Correct the markup
Edit the HTML in the tag so injected controls use native buttons and links and do not wrap focusable content in aria-hidden.
Preview before publishing
Use Preview mode, tab through the page, then publish.
Select the element
In the Designer, select the link or button and open the Element settings panel (gear icon).
Remove the custom attributes
Under Custom attributes, delete role=button on links and any aria-hidden on containers that hold focusable items.
Use the right element
Use a Link Block or Button for navigation. For actions, use a Button element or a Custom Element set to the button tag.
Open the page builder
Edit the funnel or website page and select the button or element.
Check custom code
Review Custom HTML/JS elements and the page's Custom Code settings for role and aria-hidden attributes.
Replace with native elements
Use the built-in button element for links, or fix the custom HTML. Save and tab through the published page.
Use built-in elements
Prefer the standard Button element with a link set in its settings rather than a custom-built shape or box.
Check Velo and embeds
If you use Velo (Wix's code feature) or HTML embeds, search for role and aria-hidden and fix them as in the code sample.
Hide elements properly
Use the Hide option on an element rather than aria-hidden when you want it gone for everyone.
Check Code Injection and blocks
Look in Settings > Advanced > Code Injection and in Code blocks for role="button" and aria-hidden.
Use Button blocks
Use a Button block for links so the correct tag is output.
Fix custom markup
Apply the code sample to any custom HTML, then retest by keyboard.
Swap roles for native tags
Replace <a role="button"> with <a> or <button> as appropriate. If you must keep a link styled as a button, leave it a link.
Use inert or hidden
Hide off-screen UI with the hidden attribute, display:none or visibility:hidden. Use the inert attribute on background content behind a modal.
Toggle state in script
When opening a panel, remove hidden/inert. When closing, add it back so hidden controls leave the tab order.
Misused ARIA
- <a role="button"> announced as button, Space does nothing
- Closed menu uses aria-hidden but links still tabbable
- Screen reader users land on silent controls
Native elements
- Plain <a> announced as link, Enter works
- Closed menu uses hidden or inert
- Tab skips what is not available
How to confirm it's fixed
- axe, Lighthouse or WAVE no longer reports aria-hidden-focus or role errors on the page
- Tab moves only through visible, usable controls
- Links activate with Enter; buttons activate with Enter and Space
- A screen reader announces links as links and buttons as buttons
- Opening and closing menus and modals leaves no focusable item in a hidden area
- Key journeys (form, booking, checkout) work by keyboard alone
How to prevent it happening again
Add an accessibility linter or scanner to your workflow. For developers, the eslint-plugin-jsx-a11y package (for React code) or axe-core in your tests catches these patterns before release. For non-developers, run a scan after every theme update, new plugin or page builder change.
Agree a simple house rule: navigation uses links, actions use buttons, and nothing gets a role unless a native element cannot do the job. Review third-party widgets (chat, cookie banners, popups) too, since they often add their own markup.
How FunnelGuard handles this
This issue is outside what FunnelGuard checks. FunnelGuard runs your real customer journeys on a schedule and checks that steps complete, tracking hits are sent and test leads arrive. It does not audit your markup for ARIA roles or hidden focusable elements.
The kind of tool that fits is an accessibility testing tool: an automated scanner such as axe, Lighthouse or WAVE for quick checks, plus manual keyboard and screen reader testing for the rest. Use it alongside monitoring: an accessibility scanner tells you if your markup is wrong, and FunnelGuard tells you if the journey itself still works.
Questions people ask
Why does my accessibility checker say aria-hidden elements should not be focusable?
aria-hidden="true" hides an element from screen readers but leaves it in the tab order. A keyboard user can land on it and hear nothing. Remove aria-hidden, or hide the content with the hidden attribute, inert or display:none so it is unreachable as well.
Is it wrong to use role="button" on a link?
Usually yes. A link that goes to a page should be announced as a link. role="button" tells users Space will work, but links only respond to Enter. Use a real <button> for on-page actions and a plain <a> for navigation.
How do I fix aria-hidden on a focusable element?
Decide whether the content should be available. If not, hide it with the hidden attribute, inert or display:none. If it should be available, remove aria-hidden. Then tab through the page to check that focus never lands on something that is not announced.
Should I add tabindex=-1 to elements that have aria-hidden?
It is not the best fix. tabindex="-1" removes an element from the tab order but it can still be focused by script or click. The inert attribute or display:none is more reliable because it removes both focus and screen reader access.
What is the inert attribute and when should I use it?
inert is an HTML attribute that makes an element and everything inside it non-interactive and hidden from assistive technology. Use it on page content behind an open modal, or on off-screen panels. Add it when the area is unavailable and remove it when it is available.
Can I use ARIA instead of proper HTML elements?
Avoid it where you can. The first rule of ARIA is to use a native element if one exists. A native <button> or <a> already brings keyboard support, focus and the correct role, while ARIA only adds a label and does not add behaviour.
Which tools find misused ARIA roles?
Axe DevTools, Lighthouse and WAVE all report ARIA errors on a page. They catch many cases but not all, so test with a keyboard and a screen reader such as NVDA or VoiceOver as well.
Does FunnelGuard check for ARIA misuse?
No. FunnelGuard checks that journeys complete, tracking fires and test leads arrive. ARIA roles need an accessibility scanner such as axe, Lighthouse or WAVE, plus manual testing.
Related issues
- PRF-322Buttons made from divs without role/keyboard supportFix guide
- PRF-324Icon-only buttons without accessible namesFix guide
- PRF-312Keyboard trap in modal or widgetFix guide
- PRF-315Focus not moved into opened modal / not returned on closeFix guide
- PRF-313Form cannot be completed with keyboard onlyFix guide
- PRF-314Illogical focus orderFix guide