A few weeks ago I went through every "headless UI primitive" in @snatuva/primitives — our Angular signals-first, unstyled component library — and started asking an uncomfortable question for each one:
Is this directive replacing something the browser already does for free?
For the Dialog and Accordion primitives, the answer was yes, almost entirely. We were shipping our own focus trap, our own scroll lock, our own backdrop, our own open/close state machine, our own keyboard handling for a disclosure widget — all things <dialog> and <details>/<summary> have done natively for years.
So we ripped it out. Here's what changed, what we kept, and why "use the platform" isn't just a slogan — it's a real diff with negative lines.
The old way: a <div> pretending to be a dialog






