Webflow fix

Before and after

Broken — before
<!-- Broken Webflow custom FAQ trigger (invalid aria-expanded="open" & wrong ID) -->
<button
  type="button"
  class="faq-trigger"
  aria-expanded="open"
  aria-controls="faq-body-1"
>
  How does multi-domain monitoring work?
</button>
<div id="faq-content-1" class="faq-panel">
  One flat plan covers up to 15 client domains with template deduplication.
</div>
Fixed — after
<!-- Fixed Webflow custom FAQ trigger (valid "true"/"false" + exact matching Element ID) -->
<button
  type="button"
  class="faq-trigger"
  aria-expanded="true"
  aria-controls="faq-content-1"
>
  How does multi-domain monitoring work?
</button>
<div id="faq-content-1" class="faq-panel">
  One flat plan covers up to 15 client domains with template deduplication.
</div>
Live preview

Fixed vs. broken example

Passes aria-valid-attr-value
Accessibility tree: role="button", expanded=true, controls=#demo-shipping-panel (valid WAI-ARIA 1.2 state & live DOM IDREF)

Never interpolate unvalidated booleans, undefined IDs, or custom strings like 'open'/'closed' into ARIA attributes; only render aria-controls when the controlled ID exists in the DOM.

Automated test

Playwright + axe-core check

tests/a11y-aria-valid-attr-value.spec.ts
import { test, expect } from "@playwright/test";
import AxeBuilder from "@axe-core/playwright";

test("Webflow FAQ accordions and custom attributes pass aria-valid-attr-value", async ({ page }) => {
  await page.goto("/faq");
  const results = await new AxeBuilder({ page })
    .withRules(["aria-valid-attr-value"])
    .analyze();
  expect(results.violations).toEqual([]);
});

Template deduplication tip

A duplicated Webflow FAQ Component with a mismatched aria-controls Custom Attribute fails across every landing page using that Component. Fix the master Component once and publish to clear every URL.

Screen readers

What NVDA and VoiceOver announce

Invalid ARIA tokens (like aria-expanded='open'), broken IDREFs (aria-controls pointing to a nonexistent or unmounted ID), or mistyped booleans cause browsers and screen readers to silently drop interactive state announcements.

NVDA (Windows)

Broken

"Shipping & Returns FAQ, button" (collapsed/expanded state omitted due to invalid token)


Fixed

"Shipping & Returns FAQ, button, expanded"

VoiceOver (macOS / iOS)

Broken

"Shipping & Returns FAQ, button" (state not exposed)


Fixed

"Shipping & Returns FAQ, expanded, button"

Common questions

Why should I use Webflow's native Dropdown/Tabs or <details> instead of raw custom ARIA?
Webflow's Interactions panel animates CSS height/opacity but does not automatically flip aria-expanded='false' to 'true'. Native HTML <details><summary> (or a small Webflow custom-code toggle) keeps ARIA state truthful.
What causes aria-controls failures in Webflow CMS Collection Lists?
If every CMS item uses a hardcoded ID like id='faq-panel', the page ends up with duplicate IDs and mismatched references. Bind unique CMS slug fields into custom code or use native <details> elements inside CMS lists.
Which ARIA values are commonly mistyped in Webflow Custom Attributes?
Watch out for aria-hidden='yes' (must be 'true'/'false'), aria-live='true' (must be 'polite'/'assertive'/'off'), and aria-current='true' on nav links (prefer 'page').