Skip to content

Commit a678dad

Browse files
authored
Merge pull request #17838 from wordpress-mobile/issue/12878-media-detail-improve-accessibility-full-image
Media Detail Image Full screen improve accessibility and hints
2 parents 62c8419 + 69874f0 commit a678dad

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

WordPress/Classes/ViewRelated/Reader/WPImageViewController.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ - (void)updateImageView
246246
[self.imageView sizeToFit];
247247
self.scrollView.contentSize = self.imageView.image.size;
248248
[self centerImage];
249+
249250
}
250251

251252
- (void)loadImageFromURL
@@ -568,6 +569,14 @@ - (void)setupAccessibility
568569
{
569570
self.imageView.isAccessibilityElement = YES;
570571
self.imageView.accessibilityTraits = UIAccessibilityTraitImage;
572+
573+
if (self.media != nil && self.media.title != nil) {
574+
self.imageView.accessibilityLabel = [NSString stringWithFormat:NSLocalizedString(@"Fullscreen view of image %@. Double tap to dismiss", @"Accessibility label for when image is shown to user in full screen, with instructions on how to dismiss the screen. Placeholder is the title of the image"), self.media.title];
575+
}
576+
else {
577+
self.imageView.accessibilityLabel = NSLocalizedString(@"Fullscreen view of image. Double tap to dismiss", @"Accessibility label for when image is shown to user in full screen, with instructions on how to dismiss the screen");
578+
}
579+
571580
}
572581

573582
- (BOOL)accessibilityPerformEscape

0 commit comments

Comments
 (0)