-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add support for back button accessibility trait. #219
base: master
Are you sure you want to change the base?
Conversation
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.
Nice, thanks!
@@ -10,6 +10,9 @@ | |||
/* Description for the 'button' accessibility trait */ | |||
"trait.button.description" = "Taste."; | |||
|
|||
/* Description for the 'back button' accessibility trait */ | |||
"trait.backbutton.description" = "Zurück Taste."; |
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.
Logic looks good! Can we add a snapshot test or two (maybe of a nav controller with a second vc pushed, with and without a title on the previous item) to test this?
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.
Yay, thanks for doing this!
a1d6e9d
to
544607f
Compare
@NickEntin I added snapshot tests as you suggested. Do you mind a re-review? |
Example/AccessibilitySnapshot/NavBarBackButtonAccessibilityTraitsViewController.swift
Outdated
Show resolved
Hide resolved
Example/AccessibilitySnapshot/NavBarBackButtonAccessibilityTraitsViewController.swift
Outdated
Show resolved
Hide resolved
Example/AccessibilitySnapshot/NavBarBackButtonAccessibilityTraitsViewController.swift
Outdated
Show resolved
Hide resolved
9ce0a7d
to
0bf9486
Compare
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!
Navigation controller back buttons contain a secret menu trait which calls them out with a distinct utterance of "back button" rather than simply "button". This change adds support for detecting this trait and provides the matching utterance string.