UNPKG

@microsoft/windows-admin-center-sdk

Version:

Microsoft - Windows Admin Center Shell

1 lines 939 B
{"version":3,"sources":["../../../packages/core/test-utilities/accessibility-tester.ts"],"names":[],"mappings":"AAAA,qBAAa,mBAAmB;IAC5B;;;OAGG;WACW,wBAAwB,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;CAO3E","file":"accessibility-tester.d.ts","sourcesContent":["export class AccessibilityTester {\r\n /**\r\n * Expects an anchor element to be accessible at a point in time\r\n * @param element The element to verify anchor accessibility\r\n */\r\n public static expectIsAccessibleAnchor(element: HTMLAnchorElement): void {\r\n const hasHref = !!element.href;\r\n const hasRole = element.hasAttribute('role');\r\n const hasTabIndex = !MsftSme.isNullOrUndefined(element.tabIndex);\r\n expect(hasHref || hasRole).withContext('Anchor element must have href or role').toBe(true);\r\n expect(hasHref || hasTabIndex).withContext('Anchor element must have href or tabindex').toBe(true);;\r\n }\r\n}\r\n"]}