Skip to content

Conversation

@calebeby
Copy link
Member

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.

Since it is a breaking change I will hold off on merging it

↳ description: "extended description"
text "extended description"
`);
expect(await getAccessibilityTree(body, { includeText: true }))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we changed the default value of includeText to true, this snapshot and the one above are the same. I changed the includeText property here so we test both cases.

Copy link
Contributor

@Paul-Hebert Paul-Hebert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@calebeby calebeby merged commit 847cbd8 into main Mar 31, 2022
@calebeby calebeby deleted the getAccessibilityTree-normalize-whitespace branch March 31, 2022 21:05
@github-actions github-actions bot mentioned this pull request Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants