FocusDelegated

The FocusDelegated mixin enables automatic focus delegation to the first focusable element inside the shadow root. It sets the element's role to presentation and configures the shadow root with delegatesFocus: true.

This is particularly useful for form-associated elements where the custom element itself should act as a container that automatically delegates focus to interactive elements within its shadow DOM.

Implementation Details

This mixin: