UNPKG

@microsoft/windows-admin-center-sdk

Version:

Microsoft - Windows Admin Center Shell

17 lines (15 loc) 676 B
export class AccessibilityTester { /** * Expects an anchor element to be accessible at a point in time * @param element The element to verify anchor accessibility */ static expectIsAccessibleAnchor(element) { const hasHref = !!element.href; const hasRole = element.hasAttribute('role'); const hasTabIndex = !MsftSme.isNullOrUndefined(element.tabIndex); expect(hasHref || hasRole).withContext('Anchor element must have href or role').toBe(true); expect(hasHref || hasTabIndex).withContext('Anchor element must have href or tabindex').toBe(true); ; } } //# sourceMappingURL=accessibility-tester.js.map