v2.0.0
Major Changes
-
#345
847cbd8
Thanks @calebeby! - Normalize whitespace ingetAccessibilityTree
Now anytime there is contiguous whitespace in text strings it is collapsed into a single space. This matches the behavior of browser accessibility trees.
This is a breaking change because it changes the
getAccessibilityTree
output, and may break your snapshots. Update your snapshots with Jest and review the changes. -
#446
1eaa648
Thanks @calebeby! - Use document.title as fallback implicit accessible name for html root element in accessibility tree snapshots -
#445
5fa4103
Thanks @calebeby! - Add heading levels togetAccessibilityTree
. The heading levels are computed from the corresponding element number in<h1>
-<h6>
, or from thearia-level
role.In the accessibility tree snapshot, it looks like this:
heading "Name of Heading" (level=2)
This is a breaking change because it will cause existing accessibility tree snapshots to fail which contain headings. Update the snapshots to make them pass again.
-
#451
eb364cc
Thanks @calebeby! - Addedaria-expanded
support togetAccessibilityTree
and fix handling for<details>
/<summary>
Now, elements which have the
aria-expanded
attribute will represent the state of that attribute in accessibility tree snapshots.<details>
/<summary>
elements will represent their expanded state in the tree as well.Also, for collapsed
<details>
/<summary>
elements, the hidden content is now hidden in the accessibility tree, to match screen reader behavior. -
#248
abe22a6
Thanks @gerardo-rodriguez! - Enforce minimum target size when callinguser.click()
, per WCAG Success Criterion 2.5.5 Target Size guideline.