UNPKG

@progress/kendo-e2e

Version:

Kendo UI end-to-end test utilities.

41 lines (40 loc) 1.46 kB
export type IdRefIssue = { /** CSS class selector of the element containing the referencing attribute */ selector: string; /** The attribute name (e.g. "aria-controls", "aria-labelledby") */ attribute: string; /** The ID value that was referenced but not found in the DOM */ missingId: string; }; export type IdRefResult = { /** References where the target ID exists in the DOM */ valid: { selector: string; attribute: string; id: string; }[]; /** References where the target ID does NOT exist in the DOM */ invalid: IdRefIssue[]; }; /** * Validate that ID-referencing aria attributes in the actual HTML point to * elements that actually exist in the same DOM. * * Checks `aria-controls`, `aria-labelledby`, `aria-owns`, and `aria-describedby`. * Each attribute value is treated as a space-separated list of ID tokens * (per the WAI-ARIA spec). * * @param actualHtml The actual HTML markup to validate. * @returns An `IdRefResult` with `valid` and `invalid` reference lists. */ export declare function validateIdReferences(actualHtml: string): IdRefResult; /** * Format ID reference validation results for terminal output. */ export declare function formatIdRefValidation(result: IdRefResult, options?: { useColors?: boolean; }): string; /** * Format ID reference validation as LLM-friendly plain text. */ export declare function formatIdRefForLLM(result: IdRefResult): string;