You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.1KB

  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. /**
  12. * mock window.getComputedStyle. Needs `content`, `display` and `visibility`
  13. */
  14. getComputedStyle?: typeof window.getComputedStyle;
  15. /**
  16. * Set to `true` if you want to include hidden elements in the accessible name and description computation.
  17. * Skips 2A in https://w3c.github.io/accname/#computation-steps.
  18. * @default false
  19. */
  20. hidden?: boolean;
  21. }
  22. /**
  23. * implements https://w3c.github.io/accname/#mapping_additional_nd_te
  24. * @param root
  25. * @param options
  26. * @returns
  27. */
  28. export declare function computeTextAlternative(root: Element, options?: ComputeTextAlternativeOptions): string;
  29. //# sourceMappingURL=accessible-name-and-description.d.ts.map