-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normalize whitespace in getAccessibilityTree #345
Conversation
@@ -58,24 +56,23 @@ test( | |||
↳ description: "extended description" | |||
text "extended description" | |||
`); | |||
expect(await getAccessibilityTree(body, { includeText: true })) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…normalize-whitespace
…sibilityTree-normalize-whitespace
…normalize-whitespace
…normalize-whitespace
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