① <tta-input-card> — single shadow root
Inputs, a button, and a status line live entirely inside the component's shadow root. Targets like tta-input-card input[name="email"] still work.
Three custom elements (<tta-input-card>, <tta-counter>, <tta-nested>) build their UI inside an open shadow root.
Modern Playwright pierces shadow boundaries automatically — most of the time you can write the same selector you'd use for regular DOM.
The third example nests one custom element inside another, so chained piercing comes into play.
<tta-input-card> — single shadow rootInputs, a button, and a status line live entirely inside the component's shadow root. Targets like tta-input-card input[name="email"] still work.
<tta-counter> — buttons with role + aria-labelA counter component with shadow-internal increment / decrement buttons that expose role="button" and aria-labels for accessible-name locators.
<tta-nested> — shadow inside shadowAn outer custom element renders an inner <tta-input-card> inside its own shadow root. Playwright pierces both layers in one selector.