Skip to content

v2.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 31 Mar 21:08
· 336 commits to main since this release
fb458b8

Major Changes

  • #345 847cbd8 Thanks @calebeby! - Normalize whitespace in getAccessibilityTree

    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 to getAccessibilityTree. The heading levels are computed from the corresponding element number in <h1> - <h6>, or from the aria-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! - Added aria-expanded support to getAccessibilityTree 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 calling user.click(), per WCAG Success Criterion 2.5.5 Target Size guideline.

Minor Changes