-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
♿️ - Settings #546
♿️ - Settings #546
Conversation
* Add accessibility label to dismiss button & fix the minimum width * Set navigation item properties using key paths
* Add button traits to settings cells * Invert disclosure indicators in Settings > Help
* Group current email title and value for a better accessibility * Simplify the way we set accessibility label on current email container
* Accessibility - Settings - Dismiss button (#532) * Add accessibility label to dismiss button & fix the minimum width * Set navigation item properties using key paths * Accessibility - Settings - Rows (#534) * Add button traits to settings cells * Invert disclosure indicators in Settings > Help * Add accessibility hint in case email is unverified (#535) * Focuses Voice Over on the banner when presented * Delay banner dismissal a bit more when VoiceOver is ON * Localize banner message
* Accessibility - Settings - Dismiss button (#532) * Add accessibility label to dismiss button & fix the minimum width * Set navigation item properties using key paths * Accessibility - Settings - Rows (#534) * Add button traits to settings cells * Invert disclosure indicators in Settings > Help * Accessibility - Settings - Dismiss button (#532) * Add accessibility label to dismiss button & fix the minimum width * Set navigation item properties using key paths * Accessibility - Settings - Rows (#534) * Add button traits to settings cells * Invert disclosure indicators in Settings > Help * Add accessibility hint in case email is unverified (#535) * Accessibility - Settings - Change email - Current email (#537) * Group current email title and value for a better accessibility * Simplify the way we set accessibility label on current email container * a11y for notification settings * swiftlint fix
* textfield a11y improvement in change email and password screens * change stackview alignment * new snapshots * fixed strings
* Fix newsletter switch cell accessibility * Fix project notifications switch cell accessibility * Fix settings privacy switch cell accessibility * Refocus VoiceOver on the cell when the confirmation dialog disappears * Place UIAccessibility notification behind a VoiceOver running check * Prevent refreshing the following cell when confirming the alert dialogue * Alphabetize properties * Localize properly
* corrected picker view hidden in iphone X in VM * Library tests * Update snapshot tests * vm and snapshot tests * snapshot tests * wip - digest picker is selected * properly aligned tableview constraint * removed output to hide picker * emailPickerViewHeight * VoiceOver re-focuses on the Email frequency cell * adjusted animation added guard * changed comment * Update Kickstarter-iOS/Views/Controllers/SettingsNotificationsViewController.swift Co-Authored-By: cdolm92 <cdolm92@gmail.com> * Apply suggestions from code review comments adjustment Co-Authored-By: cdolm92 <cdolm92@gmail.com> * Update Kickstarter-iOS/Views/Controllers/SettingsNotificationsViewController.swift Co-Authored-By: cdolm92 <cdolm92@gmail.com>
…frequency (#552) * Add button traits to project notifications & email frequency rows * Remove unused accessibility hint * Remove accessibility value
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.
Cool, some suggestions!
@@ -63,6 +76,10 @@ internal final class SettingsFollowCell: UITableViewCell, ValueCell { | |||
self.followingSwitch.rac.on = self.viewModel.outputs.followingPrivacyOn | |||
} | |||
|
|||
func toggleOn(animated: Bool = true) { | |||
self.followingSwitch.setOn(true, animated: animated) |
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.
Why is true
hard-coded here 🤔
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.
Good question. So this method could be more generic (i.e. toggle(on: Bool, animated: Bool)
) but since we only ever need to toggle back ON we have used more specific function named toggleOn
which implies that we're switching the toggle ON...hence setOn(true, ...)
UIView.animate( | ||
withDuration: duration, | ||
delay: 0.0, | ||
options: UIView.AnimationOptions.curveEaseInOut, |
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.
Can this infer .curveEaseInOut
or [.curveEaseInOut]
?
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.
Hopefully it won't break the compiler
animations: { [weak self] in | ||
guard let self = self else { return } | ||
|
||
if !isHidden { |
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.
Should we combine the nested if
s here into one? if !isHidden && AppEnvironment.current.isVoiceOverRunning()
, also on line 115
.
@@ -53,14 +54,34 @@ MessageBannerViewModelInputs, MessageBannerViewModelOutputs { | |||
self.messageTextAlignment = bannerType.map { $0.textAlignment } | |||
|
|||
self.bannerMessage = self.messageBannerConfiguration.signal.skipNil().map(second) | |||
self.bannerMessageAccessibilityLabel = self.bannerMessage | |||
// todo: Needs to be localized - Strings.banner_tap_to_dismiss | |||
.map { "\($0), double tap to dismiss" } |
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.
Has this been added to our strings yet?
I think it's always a good idea to use the localizedString()
function directly if we don't yet have it in Strings.swift
that way if we forget about this it's going to use localization or if we need an easy way to find it later we can just search for uses of localizedString()
.
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.
I completely forgot about this...good catch Justin.
Created https://github.com/kickstarter/kickstarter/pull/14146 and will block this PR until we have those strings.
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.
Also note that we should remove project_count_projects_backed
when https://github.com/kickstarter/kickstarter/pull/13979#pullrequestreview-198853575 gets merged
let dismissBanner = self.bannerViewIsHiddenProperty.signal | ||
.filter(isFalse) | ||
|
||
// Dismisses the banner after 4 seconds when VoiceOver is OFF |
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.
Were we certain about the use of debounce
here vs delay
? I remember chatting about it but can't recall 😅
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.
Yes, we actually really want to use debounce
. The banner was showing a weird behaviour when using delay
.
Co-Authored-By: dusi <pavel.dusatko@gmail.com>
…into a11y-settings
Addressed all outstanding feedback |
@@ -247,6 +247,7 @@ | |||
"Manage_your_pledge_below" = "Folgenden Beitrag verwalten"; | |||
"Manage_your_reward" = "Belohnung verwalten"; | |||
"Message_backer" = "Nachricht an Unterstützer senden"; | |||
"Message_banner.accessibility.Double_tap_to_dismiss" = "Double tap to dismiss."; |
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.
Currently this string is not localized, but based on the conversation we had with @peat it should not delay merging stuff to master
/:shipit:
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.
Looking good, minor comments!
} | ||
|
||
self.emailPickerViewTopConstraint.constant = isHidden ? 0 : self.emailFrequencyPickerView.frame.height | ||
self.view.setNeedsLayout() |
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.
Have you tested without setNeedsLayout()
? I think we only need layoutIfNeeded()
.
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.
Not originally my code...but have tried removing and it looks like everything works. Agree that we should only need to call layoutIfNeeded()
.
@@ -53,14 +54,33 @@ MessageBannerViewModelInputs, MessageBannerViewModelOutputs { | |||
self.messageTextAlignment = bannerType.map { $0.textAlignment } | |||
|
|||
self.bannerMessage = self.messageBannerConfiguration.signal.skipNil().map(second) | |||
self.bannerMessageAccessibilityLabel = self.bannerMessage | |||
.map { "\($0) \(Strings.Message_banner_accessibility_Double_tap_to_dismiss())" } |
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.
I guess we don't have much choice here but just something to bear in mind is that string concatenation can break translations for languages where the direction isn't left to right.
self.didCancelSocialOptOutProperty.signal, | ||
self.didConfirmSocialOptOutProperty.signal | ||
) | ||
.filter { _ in AppEnvironment.current.isVoiceOverRunning() } |
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.
Could we align the .
with the last parenthesis?
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.
Great work!
📲 What
Settings accessibility cleanup
🤔 Why
Some of our settings screens needed a bit of a11y love 🙏
🛠 How
More in-depth discussion of the change or implementation.
👀 See
#532 - Dismiss button
#534 - Settings - rows
#535 - Settings - Change email status
#537 - Settings - Change email - Current email
#545 - Settings - Change email / password input fields
#549 - Settings - Account - Privacy - Delete my KSR account button
#550 - Settings - Heading
#552 - Settings - Notifications - Manage project notifications + Email frequency
#547 - Settings - Notifications - Daily Digest picker bug
#544 - Settings - Switch toggle rows
#539 - Settings - Message banner