Skip to content
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 > Notifications - Manage project notifications + Email frequency #552

Merged
merged 3 commits into from
Jan 18, 2019

Conversation

dusi
Copy link
Contributor

@dusi dusi commented Jan 11, 2019

📲 What

Improves the accessibility of the following rows

  • Settings > Notifications > Manage project notifications
  • Settings > Notifications > Email frequency

🤔 Why

Making a11y great again

🛠 How

Using accessibilityTraits and accessibilityLabel + accessibilityValue

✅ Acceptance criteria

Test under the following conditions
👉 iOS 10, iOS 11 & iOS 12
👉Voice Over ON
👉 In order to test localization prefer to QA with one of the supported language set as the primary 📱 language

  • Settings > Notifications > Manage project notifications row is read by VoiceOver as Manage project notification, X, button where X is the number of projects backed so (i.e. Manage project notifications, twelve, button (make sure this is localized)

  • Settings > Notifications > Email frequency row is read by VoiceOver as Email frequency, Y, button where X is the selected option of frequency so (i.e. Email frequency, Individual emails, button) (make sure to login as a creator to see this option)

self.emailNotificationsButton.rac.selected = viewModel.outputs.emailNotificationsEnabled
self.emailNotificationsButton.rac.hidden = viewModel.outputs.emailNotificationButtonIsHidden
self.projectCountLabel.rac.text = viewModel.outputs.projectCountText
self.pushNotificationsButton.rac.selected = viewModel.outputs.pushNotificationsEnabled
self.pushNotificationsButton.rac.hidden = viewModel.outputs.pushNotificationButtonIsHidden
self.projectCountLabel.rac.accessibilityHint = viewModel.outputs
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't able to make VoiceOver read the hint (maybe this needs more testing on an actual device with different OS version). @Scollaco could you please run AppStore version on iOS 10/11 and see if this hint is being spoken?

If not we should also be able to remove profile_project_count_projects_backed from the Strings file

Copy link
Contributor

Choose a reason for hiding this comment

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

I was able to make the VoiceOver read the hint once I changed self.projectCountLabel.rac.accessibilityHint to self.rac.accessibilityHint, because than the hint would be coupled to the cell and not to the label.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting.

Not really sure why it won't use hint on a UILabel. But anyways in order to follow the native Settings.app patterns and the a11y audit, I think we should remove this.

@ifbarrera since you've added this localized hint, do you feel strongly about it?

Copy link
Contributor

Choose a reason for hiding this comment

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

@dusi nope don't feel strongly about it, you can go ahead and remove it for consistency with the rest of Settings accessibility work!

@dusi dusi changed the title A11y settings manage project notifications ♿️ - Settings > Notifications - Manage project notifications + Email frequency Jan 11, 2019
Copy link
Contributor

@Scollaco Scollaco left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, @dusi . I just left a few comments.

@@ -90,13 +94,12 @@ final class SettingsNotificationCell: UITableViewCell, NibLoading, ValueCell {
override func bindViewModel() {
super.bindViewModel()

self.rac.accessibilityValue = viewModel.outputs.projectCountText
Copy link
Contributor

Choose a reason for hiding this comment

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

After testing out the code, I noticed that tapping any cell on Settings > Notifications - let's say Project Updates -will make the VoiceOver say Project Updates, X, where X is the project count. I may be happening because the accessibilityValue is being set to viewModel.outputs.projectCountText in every cell here. I think that this can be solved but returning projectCountText only if the cellType = .projectNotifications

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good eye! Thanks for catching this!

self.emailNotificationsButton.rac.selected = viewModel.outputs.emailNotificationsEnabled
self.emailNotificationsButton.rac.hidden = viewModel.outputs.emailNotificationButtonIsHidden
self.projectCountLabel.rac.text = viewModel.outputs.projectCountText
self.pushNotificationsButton.rac.selected = viewModel.outputs.pushNotificationsEnabled
self.pushNotificationsButton.rac.hidden = viewModel.outputs.pushNotificationButtonIsHidden
self.projectCountLabel.rac.accessibilityHint = viewModel.outputs
Copy link
Contributor

Choose a reason for hiding this comment

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

I was able to make the VoiceOver read the hint once I changed self.projectCountLabel.rac.accessibilityHint to self.rac.accessibilityHint, because than the hint would be coupled to the cell and not to the label.

@@ -14,7 +14,6 @@ public protocol SettingsNotificationCellViewModelOutputs {
var emailNotificationsEnabled: Signal<Bool, NoError> { get }
var emailNotificationButtonIsHidden: Signal<Bool, NoError> { get }
var pushNotificationButtonIsHidden: Signal<Bool, NoError> { get }
var manageProjectNotificationsButtonAccessibilityHint: Signal<String, NoError> { get }
Copy link
Contributor

Choose a reason for hiding this comment

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

We would need to re-add this signal after making the suggested change above.

@dusi
Copy link
Contributor Author

dusi commented Jan 17, 2019

Scollaco
Scollaco previously approved these changes Jan 17, 2019
Copy link
Contributor

@Scollaco Scollaco left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the feedback, @dusi . It's looking good now! 👍

@dusi dusi force-pushed the a11y-settings-manage-project-notifications branch from a550499 to 19d6f13 Compare January 17, 2019 23:06
@dusi dusi dismissed Scollaco’s stale review January 17, 2019 23:15

Removing the approval due to a rebase

Copy link
Contributor

@Scollaco Scollaco left a comment

Choose a reason for hiding this comment

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

Still working after rebasing. I also tested in Spanish and can confirm that VoiceOver is localized.

@dusi dusi merged commit d69c736 into a11y-settings Jan 18, 2019
@dusi dusi deleted the a11y-settings-manage-project-notifications branch January 18, 2019 18:03
dusi added a commit that referenced this pull request Jan 29, 2019
…frequency (#552)

* Add button traits to project notifications & email frequency rows

* Remove unused accessibility hint

* Remove accessibility value
@dusi dusi mentioned this pull request Jan 29, 2019
dusi added a commit that referenced this pull request Feb 6, 2019
* 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

* ♿️ - Settings - Message Banner (#539)

* 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

* Expose delete my kickstarter account button instead of the label (#549)

* ♿️- Settings - Notifications - Heading  (#550)

* 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

* ♿️- Settings - Change email / Change password input fields (#545)

* textfield a11y improvement in change email and password screens

* change stackview alignment

* new snapshots

* fixed strings

* ♿️ - Settings - Switch Toggle Rows  (#544)

* 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

* ♿️ - Settings - Notifications - Daily Digest picker bug (#547)

* 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>

* ♿️ - Settings > Notifications - Manage project notifications + Email frequency (#552)

* Add button traits to project notifications & email frequency rows

* Remove unused accessibility hint

* Remove accessibility value

* Infer UIView.AnimationOptions type

* Combine conditions

* Use more functional return

Co-Authored-By: dusi <pavel.dusatko@gmail.com>

* Fix Github's messed up suggestion

* Update accessibility label to better match with localized server errors

* Add localized string

* Use localized string

* Align filter

* Remove unused call to setNeedsLayout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants