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

Unified Diff: Source/modules/accessibility/AXRenderObject.cpp

Issue 753663003: Input type file should return ButtonRole. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « Source/modules/accessibility/AXRenderObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXRenderObject.cpp
diff --git a/Source/modules/accessibility/AXRenderObject.cpp b/Source/modules/accessibility/AXRenderObject.cpp
index aaccaacbfc23aac6aa405be6ee28755266f7de4e..8f818fe7d5c5ba77e13a461116d28e7a8ff90189 100644
--- a/Source/modules/accessibility/AXRenderObject.cpp
+++ b/Source/modules/accessibility/AXRenderObject.cpp
@@ -332,6 +332,8 @@ AccessibilityRole AXRenderObject::determineAccessibilityRole()
return MenuItemRadioRole;
return RadioButtonRole;
}
+ if (type == InputTypeNames::file)
+ return ButtonRole;
if (type == InputTypeNames::number)
return SpinButtonRole;
if (input.isTextButton())
@@ -343,9 +345,6 @@ AccessibilityRole AXRenderObject::determineAccessibilityRole()
return TextFieldRole;
}
- if (isFileUploadButton())
- return ButtonRole;
-
if (cssBox && cssBox->isMenuList())
return PopUpButtonRole;
@@ -496,11 +495,6 @@ bool AXRenderObject::isAttachment() const
return isRenderPart;
}
-bool AXRenderObject::isFileUploadButton() const
-{
- return m_renderer && isHTMLInputElement(m_renderer->node()) && toHTMLInputElement(*m_renderer->node()).type() == InputTypeNames::file;
-}
-
static bool isLinkable(const AXObject& object)
{
if (!object.renderer())
« no previous file with comments | « Source/modules/accessibility/AXRenderObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698