// Seeds ARIA attributes so Solid 2's DOM spread keeps the key in `ownKeys` // from render 1 — see `test/internals/merge-props-undefined-attr.test.tsx`. export function ariaLabelledBy(read: () => string | undefined): { readonly "aria-labelledby": string; } { return { get "aria-labelledby"(): string { return read() ?? ""; }, }; } export function ariaDescribedBy(read: () => string | undefined): { readonly "aria-describedby": string; } { return { get "aria-describedby"(): string { return read() ?? ""; }, }; } export function ariaInvalid(read: () => boolean | undefined): { readonly "aria-invalid": "true" | "false" | undefined; } { return { get "aria-invalid"(): "true" | "false" | undefined { const v = read(); if (v === undefined) return undefined; return v ? "true" : "false"; }, }; }