/** PettyAlert — inline status message with variant-driven ARIA role. */ export class PettyAlert extends HTMLElement { static observedAttributes = ["variant"]; get variant(): string { return this.getAttribute("variant") ?? "default"; } connectedCallback(): void { this.#sync(); } attributeChangedCallback(): void { this.#sync(); } #sync(): void { const v = this.variant; this.dataset.variant = v; const isUrgent = v === "error" || v === "warning"; this.setAttribute("role", isUrgent ? "alert" : "status"); } }