/** * A component's own ARIA on its host, written as attributes — and only where the author left them empty. * * `ElementInternals` defaults are invisible from the DOM by design, so every DOM-based tool — Playwright's * `getByRole`, Testing Library's `*ByRole`, axe-core — computes a host with no role and no name, while the * browser's accessibility tree shows both. A role-based e2e query then finds nothing, and an audit of a `dialog` * named only through internals would report it unnamed. An attribute is what assistive technology and those * tools both read. * * Ownership rule: an attribute is ours only if it was absent the first time we wrote it, and it stays ours only * while it still holds the value we last wrote. An author value — set before or after — always wins: we never * overwrite it and never remove it. Attributes cannot be written from a custom element constructor, so the first * write belongs in `connectedCallback` or later. */ export declare class HostAria { private readonly host; /** attribute → the value we last wrote (`null` = we removed it, or wrote nothing yet). */ private readonly owned; /** Attributes the author set — never touched again. */ private readonly authored; constructor(host: Element); /** Writes `value` (`null` removes) if the attribute is ours. Returns whether it is. */ set(name: string, value: string | null): boolean; /** True when the author has set this attribute — the host's own value, not ours. */ isAuthored(name: string): boolean; /** * Decides ownership. A first look at an empty attribute makes it ours (when `take`); a value we did not write * makes it the author's for good. */ private claim; } /** * Names `host` after the elements (or text) of one of its slots, as `aria-labelledby` — or `aria-label` when the * slot holds only text, or elements outside the host's tree that an IDREF cannot reach. An author's * `aria-label`/`aria-labelledby` on the host wins over both. Ids we give to slotted elements are tracked in * `given` and withdrawn once those elements leave the slot (unless the author has since changed them). */ export declare function nameFromSlot(aria: HostAria, host: Element, slot: HTMLSlotElement, given: Map): void;