Log Message
AX: Make form validation accessible on iOS https://bugs.webkit.org/show_bug.cgi?id=168400
Reviewed by Chris Dumez. Hide the popover content of form validation from accessibility (since its not interactable) and instead announce the message. * platform/ios/ValidationBubbleIOS.mm: (WebCore::ValidationBubble::show):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (212440 => 212441)
--- trunk/Source/WebCore/ChangeLog 2017-02-16 17:56:04 UTC (rev 212440)
+++ trunk/Source/WebCore/ChangeLog 2017-02-16 18:07:17 UTC (rev 212441)
@@ -1,3 +1,16 @@
+2017-02-16 Chris Fleizach <cfleiz...@apple.com>
+
+ AX: Make form validation accessible on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=168400
+
+ Reviewed by Chris Dumez.
+
+ Hide the popover content of form validation from accessibility (since its not interactable)
+ and instead announce the message.
+
+ * platform/ios/ValidationBubbleIOS.mm:
+ (WebCore::ValidationBubble::show):
+
2017-02-16 Simon Fraser <simon.fra...@apple.com>
Clean up use of some CALayer-related SPI
Modified: trunk/Source/WebCore/platform/ios/ValidationBubbleIOS.mm (212440 => 212441)
--- trunk/Source/WebCore/platform/ios/ValidationBubbleIOS.mm 2017-02-16 17:56:04 UTC (rev 212440)
+++ trunk/Source/WebCore/platform/ios/ValidationBubbleIOS.mm 2017-02-16 18:07:17 UTC (rev 212441)
@@ -41,6 +41,9 @@
SOFT_LINK_CLASS(UIKit, UIView);
SOFT_LINK_CLASS(UIKit, UIViewController);
SOFT_LINK_CONSTANT(UIKit, UIFontTextStyleCallout, UIFontTextStyle);
+SOFT_LINK_CONSTANT(UIKit, UIAccessibilityAnnouncementNotification, UIAccessibilityNotifications);
+#define UIAccessibilityPostNotification getUIAccessibilityPostNotification
+SOFT_LINK(UIKit, UIAccessibilityPostNotification, void, (UIAccessibilityNotifications n, id argument), (n, argument));
@interface WebValidationBubbleTapRecognizer : NSObject
@end
@@ -134,7 +137,12 @@
// Protect the validation bubble so it stays alive until it is effectively presented. UIKit does not deal nicely with
// dismissing a popover that is being presented.
RefPtr<ValidationBubble> protectedThis(this);
- [m_presentingViewController presentViewController:m_popoverController.get() animated:NO completion:[protectedThis]() { }];
+ [m_presentingViewController presentViewController:m_popoverController.get() animated:NO completion:[protectedThis]() {
+ // Hide this popover from VoiceOver and instead announce the message.
+ [protectedThis->m_popoverController.get().view setAccessibilityElementsHidden:YES];
+ }];
+
+ UIAccessibilityPostNotification(getUIAccessibilityAnnouncementNotification(), m_message);
}
static UIViewController *fallbackViewController(UIView *view)
_______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes