Index: Source/modules/accessibility/AXNodeObject.cpp |
diff --git a/Source/modules/accessibility/AXNodeObject.cpp b/Source/modules/accessibility/AXNodeObject.cpp |
index d532cb22d7305b3e8a7cbb1cc319ed858cb1a2e8..151bb67176eda090b410c3d42c3c3fd1d72b8158 100644 |
--- a/Source/modules/accessibility/AXNodeObject.cpp |
+++ b/Source/modules/accessibility/AXNodeObject.cpp |
@@ -878,7 +878,7 @@ int AXNodeObject::headingLevel() const |
if (!node) |
return 0; |
- if (ariaRoleAttribute() == HeadingRole) |
+ if (roleValue() == HeadingRole && hasAttribute(aria_levelAttr)) |
return getAttribute(aria_levelAttr).toInt(); |
if (!node->isHTMLElement()) |