accessible-name-and-description.d.ts 848 B

1234567891011121314151617181920
  1. /**
  2. * interface for an options-bag where `window.getComputedStyle` can be mocked
  3. */
  4. export interface ComputeTextAlternativeOptions {
  5. compute?: "description" | "name";
  6. /**
  7. * Set to true if window.computedStyle supports the second argument.
  8. * This should be false in JSDOM. Otherwise JSDOM will log console errors.
  9. */
  10. computedStyleSupportsPseudoElements?: boolean;
  11. getComputedStyle?: typeof window.getComputedStyle;
  12. }
  13. /**
  14. * implements https://w3c.github.io/accname/#mapping_additional_nd_te
  15. * @param root
  16. * @param [options]
  17. * @param [options.getComputedStyle] - mock window.getComputedStyle. Needs `content`, `display` and `visibility`
  18. */
  19. export declare function computeTextAlternative(root: Element, options?: ComputeTextAlternativeOptions): string;
  20. //# sourceMappingURL=accessible-name-and-description.d.ts.map