Diff
Modified: trunk/LayoutTests/ChangeLog (198380 => 198381)
--- trunk/LayoutTests/ChangeLog 2016-03-18 06:36:21 UTC (rev 198380)
+++ trunk/LayoutTests/ChangeLog 2016-03-18 06:52:54 UTC (rev 198381)
@@ -1,3 +1,14 @@
+2016-03-17 Chris Fleizach <[email protected]>
+
+ AX: WEB: VoiceOver does not announce some WAI-ARIA document structures
+ https://bugs.webkit.org/show_bug.cgi?id=155603
+ <rdar://problem/25227385>
+
+ Reviewed by Darin Adler.
+
+ * accessibility/ios-simulator/landmark-type-expected.txt:
+ * accessibility/ios-simulator/landmark-type.html:
+
2016-03-17 Brent Fulgham <[email protected]>
[XSS Auditor] Off by one in XSSAuditor::canonicalizedSnippetForJavaScript()
Modified: trunk/LayoutTests/accessibility/ios-simulator/landmark-type-expected.txt (198380 => 198381)
--- trunk/LayoutTests/accessibility/ios-simulator/landmark-type-expected.txt 2016-03-18 06:36:21 UTC (rev 198380)
+++ trunk/LayoutTests/accessibility/ios-simulator/landmark-type-expected.txt 2016-03-18 06:52:54 UTC (rev 198381)
@@ -2,6 +2,10 @@
text
text
text
+footer
+article
+document
+note
This tests that landmarks return their type as part of the AX label.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -13,6 +17,14 @@
PASS banner.childAtIndex(0).traits != nonLandmarkText.traits is true
PASS region.description is 'AXLabel: testregion, region'
PASS region.childAtIndex(0).traits != nonLandmarkText.traits is true
+PASS footer.description is 'AXLabel: footer'
+PASS footer.childAtIndex(0).traits != nonLandmarkText.traits is true
+PASS article.description is 'AXLabel: article'
+PASS article.childAtIndex(0).traits != nonLandmarkText.traits is true
+PASS note.description is 'AXLabel: note'
+PASS note.childAtIndex(0).traits != nonLandmarkText.traits is true
+PASS documentContainer.description is 'AXLabel: document'
+PASS documentContainer.childAtIndex(0).traits != nonLandmarkText.traits is true
PASS region.childAtIndex(0).traits == main.childAtIndex(0).traits is true
PASS successfullyParsed is true
Modified: trunk/LayoutTests/accessibility/ios-simulator/landmark-type.html (198380 => 198381)
--- trunk/LayoutTests/accessibility/ios-simulator/landmark-type.html 2016-03-18 06:36:21 UTC (rev 198380)
+++ trunk/LayoutTests/accessibility/ios-simulator/landmark-type.html 2016-03-18 06:52:54 UTC (rev 198381)
@@ -24,6 +24,22 @@
text
</div>
+<footer id="footer">
+footer
+</footer>
+
+<div role="article" id="article">
+article
+</div>
+
+<div role="document" id="documentcontainer">
+document
+</div>
+
+<div role="note" id="note">
+note
+</div>
+
<p id="description"></p>
<div id="console"></div>
@@ -49,6 +65,22 @@
shouldBe("region.description", "'AXLabel: testregion, region'");
shouldBeTrue("region.childAtIndex(0).traits != nonLandmarkText.traits");
+ var footer = accessibilityController.accessibleElementById("footer");
+ shouldBe("footer.description", "'AXLabel: footer'");
+ shouldBeTrue("footer.childAtIndex(0).traits != nonLandmarkText.traits");
+
+ var article = accessibilityController.accessibleElementById("article");
+ shouldBe("article.description", "'AXLabel: article'");
+ shouldBeTrue("article.childAtIndex(0).traits != nonLandmarkText.traits");
+
+ var note = accessibilityController.accessibleElementById("note");
+ shouldBe("note.description", "'AXLabel: note'");
+ shouldBeTrue("note.childAtIndex(0).traits != nonLandmarkText.traits");
+
+ var documentContainer = accessibilityController.accessibleElementById("documentcontainer");
+ shouldBe("documentContainer.description", "'AXLabel: document'");
+ shouldBeTrue("documentContainer.childAtIndex(0).traits != nonLandmarkText.traits");
+
shouldBeTrue("region.childAtIndex(0).traits == main.childAtIndex(0).traits");
}
Modified: trunk/Source/WebCore/ChangeLog (198380 => 198381)
--- trunk/Source/WebCore/ChangeLog 2016-03-18 06:36:21 UTC (rev 198380)
+++ trunk/Source/WebCore/ChangeLog 2016-03-18 06:52:54 UTC (rev 198381)
@@ -1,3 +1,25 @@
+2016-03-17 Chris Fleizach <[email protected]>
+
+ AX: WEB: VoiceOver does not announce some WAI-ARIA document structures
+ https://bugs.webkit.org/show_bug.cgi?id=155603
+ <rdar://problem/25227385>
+
+ Reviewed by Darin Adler.
+
+ Expose more ARIA landmark type roles on iOS for accessibility.
+
+ Updated test: accessibility/ios-simulator/landmark-type.html
+
+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+ (-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
+ (-[WebAccessibilityObjectWrapper accessibilityLabel]):
+ * platform/LocalizedStrings.cpp:
+ (WebCore::searchMenuClearRecentSearchesText):
+ (WebCore::AXWebAreaText):
+ (WebCore::AXListItemActionVerb):
+ (WebCore::AXAutoFillCredentialsLabel):
+ * platform/LocalizedStrings.h:
+
2016-03-17 Daniel Bates <[email protected]>
Cleanup: Remove the need to pass reporting status to ContentSecurityPolicy functions
Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (198380 => 198381)
--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2016-03-18 06:36:21 UTC (rev 198380)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2016-03-18 06:52:54 UTC (rev 198381)
@@ -498,7 +498,11 @@
- (BOOL)_accessibilityIsLandmarkRole:(AccessibilityRole)role
{
switch (role) {
+ case DocumentRole:
+ case DocumentArticleRole:
+ case DocumentNoteRole:
case DocumentRegionRole:
+ case FooterRole:
case LandmarkApplicationRole:
case LandmarkBannerRole:
case LandmarkComplementaryRole:
@@ -958,7 +962,11 @@
NSString *axTitle = [self baseAccessibilityTitle];
NSString *axDescription = [self baseAccessibilityDescription];
NSString *landmarkDescription = [self ariaLandmarkRoleDescription];
-
+
+ // Footer is not considered a landmark, but we want the role description.
+ if (m_object->roleValue() == FooterRole)
+ landmarkDescription = AXFooterRoleDescriptionText();
+
NSMutableString *result = [NSMutableString string];
if (m_object->roleValue() == HorizontalRuleRole)
appendStringToResult(result, AXHorizontalRuleDescriptionText());
Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (198380 => 198381)
--- trunk/Source/WebCore/platform/LocalizedStrings.cpp 2016-03-18 06:36:21 UTC (rev 198380)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp 2016-03-18 06:52:54 UTC (rev 198381)
@@ -544,6 +544,7 @@
{
return WEB_UI_STRING("Clear Recent Searches", "menu item in Recent Searches menu that empties menu's contents");
}
+#endif // !PLATFORM(IOS)
String AXWebAreaText()
{
@@ -652,7 +653,6 @@
notImplemented();
return "select";
}
-#endif // !PLATFORM(IOS)
String AXAutoFillCredentialsLabel()
{
Modified: trunk/Source/WebCore/platform/LocalizedStrings.h (198380 => 198381)
--- trunk/Source/WebCore/platform/LocalizedStrings.h 2016-03-18 06:36:21 UTC (rev 198380)
+++ trunk/Source/WebCore/platform/LocalizedStrings.h 2016-03-18 06:52:54 UTC (rev 198381)
@@ -149,6 +149,7 @@
String searchMenuNoRecentSearchesText();
String searchMenuRecentSearchesText();
String searchMenuClearRecentSearchesText();
+#endif
String AXWebAreaText();
String AXLinkText();
@@ -172,7 +173,6 @@
String AXMenuListPopupActionVerb();
String AXLinkActionVerb();
String AXListItemActionVerb();
-#endif
#if ENABLE(INPUT_TYPE_WEEK)
// weekFormatInLDML() returns week and year format in LDML, Unicode