diff --git a/Apptentive/Apptentive/Apptentive.h b/Apptentive/Apptentive/Apptentive.h index 5cb9c0a6e..9a6a9ae8c 100644 --- a/Apptentive/Apptentive/Apptentive.h +++ b/Apptentive/Apptentive/Apptentive.h @@ -20,7 +20,7 @@ FOUNDATION_EXPORT double ApptentiveVersionNumber; FOUNDATION_EXPORT const unsigned char ApptentiveVersionString[]; /** The version number of the Apptentive SDK. */ -#define kApptentiveVersionString @"5.0.0" +#define kApptentiveVersionString @"5.0.1" /** The version number of the Apptentive API platform. */ #define kApptentiveAPIVersionString @"9" diff --git a/Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewController.m b/Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewController.m index d243599a4..20ae38562 100644 --- a/Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewController.m +++ b/Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewController.m @@ -240,6 +240,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell cell.textField.delegate = self; cell.textField.tag = [self.viewModel textFieldTagForIndexPath:indexPath]; cell.textField.font = [self.viewModel.styleSheet fontForStyle:ApptentiveTextStyleTextInput]; + cell.textField.accessibilityLabel = cell.textField.placeholder; cell.textField.textColor = [self.viewModel.styleSheet colorForStyle:ApptentiveTextStyleTextInput]; return cell; @@ -337,7 +338,7 @@ - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView view.textLabel.text = [self.viewModel textOfQuestionAtIndex:indexPath.section]; view.textLabel.font = [self.viewModel.styleSheet fontForStyle:UIFontTextStyleBody]; view.textLabel.textColor = [self.viewModel.styleSheet colorForStyle:UIFontTextStyleBody]; - + view.textLabel.accessibilityHint = [self.viewModel accessibilityHintForQuestionAtIndexPath:indexPath]; view.instructionsTextLabel.attributedText = [self.viewModel instructionTextOfQuestionAtIndex:indexPath.section]; view.instructionsTextLabel.font = [self.viewModel.styleSheet fontForStyle:ApptentiveTextStyleSurveyInstructions]; diff --git a/Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewModel.h b/Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewModel.h index 5f48ba190..8cb4728cd 100644 --- a/Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewModel.h +++ b/Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewModel.h @@ -45,6 +45,7 @@ NS_ASSUME_NONNULL_BEGIN - (NSString *)textOfQuestionAtIndex:(NSInteger)index; - (nullable NSAttributedString *)instructionTextOfQuestionAtIndex:(NSInteger)index; - (NSAttributedString *)placeholderTextOfAnswerAtIndexPath:(NSIndexPath *)indexPath; +- (nullable NSString *)accessibilityHintForQuestionAtIndexPath:(NSIndexPath *)indexPath; - (ATSurveyQuestionType)typeOfQuestionAtIndex:(NSInteger)index; - (ApptentiveSurveyAnswerType)typeOfAnswerAtIndexPath:(NSIndexPath *)indexPath; diff --git a/Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewModel.m b/Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewModel.m index b57be8882..69ce30bd9 100644 --- a/Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewModel.m +++ b/Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewModel.m @@ -156,6 +156,15 @@ - (BOOL)answerIsSelectedAtIndexPath:(NSIndexPath *)indexPath { return [self.selectedIndexPaths containsObject:indexPath]; } +- (nullable NSString *)accessibilityHintForQuestionAtIndexPath:(NSIndexPath *)indexPath { + ApptentiveSurveyQuestion *question = [self questionAtIndex:indexPath.section]; + if (question.required) { + return ApptentiveLocalizedString(@"required", @"Required answer hint"); + } + + return nil; +} + - (ATSurveyQuestionType)typeOfQuestionAtIndex:(NSInteger)index { return [self questionAtIndex:index].type; } diff --git a/CHANGELOG.md b/CHANGELOG.md index 49eff13cb..dd92dcd8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +2018-01-30 frankus, weeebox v5.0.1 +---------------------------------- +###Improvements + +- Accessibility improvements for VoiceOver. + 2017-12-15 frankus, weeebox v5.0.0 ---------------------------------- ###Improvements diff --git a/Example/Podfile.lock b/Example/Podfile.lock index f869ef57d..f6773bae9 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - apptentive-ios (5.0.0) + - apptentive-ios (5.0.1) DEPENDENCIES: - apptentive-ios (from `..`) @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: .. SPEC CHECKSUMS: - apptentive-ios: f473d64b41e3c28a1f5824399f38f0f037303066 + apptentive-ios: bfaa33a5bd2f345d697038bf81f46b3010642f26 PODFILE CHECKSUM: fb7822acbd17e9b6c60d2db75808647cc370b6a0 diff --git a/apptentive-ios.podspec b/apptentive-ios.podspec index 5fc5a9dfd..7ffb6e898 100644 --- a/apptentive-ios.podspec +++ b/apptentive-ios.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'apptentive-ios' s.module_name = 'Apptentive' - s.version = '5.0.0' + s.version = '5.0.1' s.license = 'BSD' s.summary = 'Apptentive Customer Communications SDK.' s.homepage = 'https://www.apptentive.com/'