-
Notifications
You must be signed in to change notification settings - Fork 33
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
[DON-491] Update search modal to fix the test automation #1958
[DON-491] Update search modal to fix the test automation #1958
Conversation
@@ -74,7 +75,6 @@ public struct BPKAppSearchModal: View { | |||
.padding(.top, .base) | |||
.padding(.bottom, BPKSpacing.none) | |||
.background(.surfaceDefaultColor) | |||
.accessibilityAddTraits(.isModal) |
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.
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.
How does this work for screen readers after this change. Is the focus properly 'trapped' in the view once it's open?
I assume it is because we present it with a .sheet{ } modifier, but could you double check please?
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.
@gert-janvercauteren There is no change for the current configuration of how our screens are placed in navigation structure. This modifier is responsible for preventing any undesirable screen readings of elements on the same level as the modal screen. It's still weird how Maestro reads the hierarchy here, and it seems like a small bug to me. However, it's completely fine to remove this modifier here, as it's not anything mandatory, it was just preventative.
Also, I additionally checked that with the accessibility inspector and there is no changes here.
@@ -65,6 +65,7 @@ public struct BPKSearchInputSummary: View { | |||
.focused($focused) | |||
.accessibilityAddTraits(.isSearchField) | |||
.accessibilityLabel(placeholder) | |||
.accessibilityIdentifier("search_field") |
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.
Made the automated test accessible in different localisation.
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, Cherry on top would be a note in the README on UI-testing, so everyone is aware we can now use the search_field identifier when using this component. @novinfard-skyscanner would you be up for adding that before merging?
[DON-491]
Update search modal to fix the test automation
Remember to include the following changes:
README.md
Backpack.h
header fileIf you are curious about how we review, please read through the code review guidelines