The same mount source, editable, with Radix UI resolved at the exact scored version. Example styling ships as polish.css; delete its import for the bare mount. Runs on CodeSandbox's bundler; the measurement belongs to the untouched mount.
import*asAccordionfrom"@radix-ui/react-accordion";import{TEXT}from"./harness-kit";/**
* Radix UI accordion, mounted exactly as the Radix documentation describes.
*
* `type="single"` with `collapsible` so an expanded section can be closed again
* The default without it refuses to collapse the open section,
* which is a configuration choice rather than the library's natural behaviour.
* All sections start collapsed, per the protocol.
*
* Radix requires the Header/Trigger split, so the heading element comes from
* Accordion.Header and the button from Accordion.Trigger.
*/exportfunctionAccordionHarness(){return(<><buttondata-testid="hr-before"type="button">
Before
</button><Accordion.Roottype="single"collapsible><Accordion.Itemvalue="shipping"><Accordion.Header><Accordion.Triggerdata-testid="hr-header-1">{TEXT.accordionHeader1}</Accordion.Trigger></Accordion.Header><Accordion.Contentdata-testid="hr-panel-1">{TEXT.accordionPanel1}</Accordion.Content></Accordion.Item><Accordion.Itemvalue="payment"><Accordion.Header><Accordion.Triggerdata-testid="hr-header-2">{TEXT.accordionHeader2}</Accordion.Trigger></Accordion.Header><Accordion.Contentdata-testid="hr-panel-2">{TEXT.accordionPanel2}</Accordion.Content></Accordion.Item><Accordion.Itemvalue="review"><Accordion.Header><Accordion.Triggerdata-testid="hr-header-3">{TEXT.accordionHeader3}</Accordion.Trigger></Accordion.Header><Accordion.Contentdata-testid="hr-panel-3">{TEXT.accordionPanel3}</Accordion.Content></Accordion.Item></Accordion.Root><buttondata-testid="hr-after"type="button">
After
</button></>);}
Self-run companion check, approximated in-browser from ARIA attributes and visibility. Official scores are measured by the runner with replayable Playwright traces.