Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Unified Diff: Source/core/accessibility/AccessibilityRenderObject.cpp

Issue 22331005: Clean up accessibility enums for use in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: reupload Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/accessibility/AccessibilityRenderObject.cpp
diff --git a/Source/core/accessibility/AccessibilityRenderObject.cpp b/Source/core/accessibility/AccessibilityRenderObject.cpp
index 359a0c93569569a53f19bc32350e8fcd91f2ed04..21bc8f553bdf09146e1a70a57f0fffb3bd9eb982 100644
--- a/Source/core/accessibility/AccessibilityRenderObject.cpp
+++ b/Source/core/accessibility/AccessibilityRenderObject.cpp
@@ -324,7 +324,7 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
if (node && node->isLink()) {
if (cssBox && cssBox->isImage())
return ImageMapRole;
- return WebCoreLinkRole;
+ return LinkRole;
}
if (cssBox && cssBox->isListItem())
return ListItemRole;
@@ -418,22 +418,22 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
return FormRole;
if (node && node->hasTagName(articleTag))
- return DocumentArticleRole;
+ return ArticleRole;
if (node && node->hasTagName(mainTag))
- return LandmarkMainRole;
+ return MainRole;
if (node && node->hasTagName(navTag))
- return LandmarkNavigationRole;
+ return NavigationRole;
if (node && node->hasTagName(asideTag))
- return LandmarkComplementaryRole;
+ return ComplementaryRole;
if (node && node->hasTagName(sectionTag))
- return DocumentRegionRole;
+ return RegionRole;
if (node && node->hasTagName(addressTag))
- return LandmarkContentInfoRole;
+ return ContentInfoRole;
// The HTML element should not be exposed as an element. That's what the RenderView element does.
if (node && isHTMLHtmlElement(node))
@@ -442,7 +442,7 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
// There should only be one banner/contentInfo per page. If header/footer are being used within an article or section
// then it should not be exposed as whole page's banner/contentInfo
if (node && node->hasTagName(headerTag) && !isDescendantOfElementType(articleTag) && !isDescendantOfElementType(sectionTag))
- return LandmarkBannerRole;
+ return BannerRole;
if (node && node->hasTagName(footerTag) && !isDescendantOfElementType(articleTag) && !isDescendantOfElementType(sectionTag))
return FooterRole;
@@ -967,7 +967,6 @@ String AccessibilityRenderObject::actionVerb() const
case CheckBoxRole:
return isChecked() ? AXCheckedCheckBoxActionVerb() : AXUncheckedCheckBoxActionVerb();
case LinkRole:
- case WebCoreLinkRole:
return AXLinkActionVerb();
default:
return emptyString();
@@ -1185,14 +1184,14 @@ const AtomicString& AccessibilityRenderObject::ariaLiveRegionStatus() const
// These roles have implicit live region status.
if (liveRegionStatus.isEmpty()) {
switch (roleValue()) {
- case ApplicationAlertDialogRole:
- case ApplicationAlertRole:
+ case AlertDialogRole:
+ case AlertRole:
return liveRegionStatusAssertive;
- case ApplicationLogRole:
- case ApplicationStatusRole:
+ case LogRole:
+ case StatusRole:
return liveRegionStatusPolite;
- case ApplicationTimerRole:
- case ApplicationMarqueeRole:
+ case TimerRole:
+ case MarqueeRole:
return liveRegionStatusOff;
default:
break;

Powered by Google App Engine
This is Rietveld 408576698