https://bugs.webkit.org/show_bug.cgi?id=139071
Reviewed by Chris Fleizach.
Source/WebCore:
Adds a new InlineRole accessibility role type for non-focusable inline
elements which have an event handler or attribute suggesting possible
inclusion by the platform. This is mapped to ATK_ROLE_STATIC for GTK and
EFL. On the Mac, it is currently ignored to preserve existing behavior.
Added new test cases to the existing roles-exposed.html test.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsDatetimeAttribute): Added.
* accessibility/AccessibilityObject.h: Added InlineRole.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole): Handle InlineRole.
* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Include InlineRole objects.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Ignore InlineRole objects.
* html/HTMLTagNames.in: Added 'time'.
Tools:
Add string value for ATK_ROLE_STATIC in roleToString.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
LayoutTests:
* accessibility/roles-exposed.html: New test cases added.
* platform/efl/accessibility/roles-exposed-expected.txt: Updated for new test cases.
* platform/gtk/accessibility/roles-exposed-expected.txt: Updated for new test cases.
* platform/mac-mavericks/accessibility/roles-exposed-expected.txt: Updated for new test cases.
* platform/mac-mountainlion/accessibility/roles-exposed-expected.txt: Updated for new test cases.
* platform/mac/accessibility/roles-exposed-expected.txt: Updated for new test cases.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176731
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-12-03 Joanmarie Diggs <jdiggs@igalia.com>
+
+ AX: [ATK] Inline text elements with accessible object attributes and/or event handlers are not exposed
+ https://bugs.webkit.org/show_bug.cgi?id=139071
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/roles-exposed.html: New test cases added.
+ * platform/efl/accessibility/roles-exposed-expected.txt: Updated for new test cases.
+ * platform/gtk/accessibility/roles-exposed-expected.txt: Updated for new test cases.
+ * platform/mac-mavericks/accessibility/roles-exposed-expected.txt: Updated for new test cases.
+ * platform/mac-mountainlion/accessibility/roles-exposed-expected.txt: Updated for new test cases.
+ * platform/mac/accessibility/roles-exposed-expected.txt: Updated for new test cases.
+
2014-12-03 Chris Dumez <cdumez@apple.com>
Add layout test for DOM timer throttling in iframe scrolled out of viewport
<!-- ==================================================================================================== -->
<a data-platform="atk,mac" href="#" data-note="[href]" class="ex">X</a>
<a data-platform="atk,mac" data-note=":not([href])" class="ex">X</a>
-<abbr data-platform="atk,mac" class="ex">X</abbr>
+<abbr data-platform="atk,mac" data-note=":not([title])" class="ex">X</abbr>
+<abbr data-platform="atk,mac" title="Times" data-note="[title]" class="ex">X</abbr>
<!-- http://webkit.org/b/83989 --><address data-platform="atk,mac" class="ex">X</address>
<!-- skipped <area> -->
<article data-platform="atk,mac" class="ex">X</article>
<code data-platform="atk,mac" class="ex">X</code>
<!-- skipped <command> -->
<!-- skipped <datalist> -->
-<del data-platform="atk,mac" class="ex">X</del>
+<del data-platform="atk,mac" data-note=":not([datetime])" class="ex">X</del>
+<del data-platform="atk,mac" datetime="2014-10-31 00:00" data-note="[datetime]" class="ex">X</del>
<!-- skipped <details/summary> http://webkit.org/b/108979 -->
<dfn data-platform="atk,mac" class="ex">X</dfn>
<dl data-platform="atk,mac" class="ex">
<!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="time" value="X" class="ex" data-note="[type='time']">
<!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="url" value="X" class="ex" data-note="[type='url']">
<!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="week" value="X" class="ex" data-note="[type='week']">
-<ins data-platform="atk,mac" class="ex">X</ins>
+<ins data-platform="atk,mac" data-note=":not([datetime])" class="ex">X</ins>
+<ins data-platform="atk,mac" datetime="2014-10-31 00:00" data-note="[datetime]" class="ex">X</ins>
<!-- skipped <link> -->
<map data-platform="atk,mac" class="ex" name="imagemap">
<area data-platform="atk,mac" class="ex" shape="rect" coords="0,0,10,10" href="#" title="x" />
</select>
<small data-platform="atk,mac" class="ex">X</small>
<!-- skipped <source> -->
-<span data-platform="atk,mac" class="ex">X</span>
+<span data-platform="atk,mac" data-note=":not([onclick])" class="ex">X</span>
+<span data-platform="atk,mac" onclick="return;" data-note="[onclick]" class="ex">X</span>
<strong data-platform="atk,mac" class="ex">X</strong>
<!-- skipped <style> -->
<sub data-platform="atk,mac" class="ex">X</sub>
</tfoot>
</table>
<textarea data-platform="atk,mac" class="ex">X</textarea>
-<time data-platform="atk,mac" class="ex">X</time>
+<time data-platform="atk,mac" data-note=":not([datetime])" class="ex">X</time>
+<time data-platform="atk,mac" datetime="2014-10-31 00:00" data-note="[datetime]" class="ex">X</time>
<!-- skipped <title> -->
<ul data-platform="atk,mac" class="ex">
<li data-platform="atk,mac" class="ex">X</li>
a:not([href])
AXRole:
-abbr
+abbr:not([title])
AXRole:
+abbr[title]
+ AXRole: AXUnknown
+
address
AXRole: AXLandmarkContentInfo
code
AXRole:
-del
+del:not([datetime])
AXRole:
+del[datetime]
+ AXRole: AXUnknown
+
dfn
AXRole: AXDefinition
input[type='week']
AXRole: AXTextField
-ins
+ins:not([datetime])
AXRole:
+ins[datetime]
+ AXRole: AXUnknown
+
map
AXRole:
small
AXRole:
-span
+span:not([onclick])
AXRole:
+span[onclick]
+ AXRole: AXUnknown
+
strong
AXRole:
textarea
AXRole: AXTextField
-time
+time:not([datetime])
AXRole:
+time[datetime]
+ AXRole: AXUnknown
+
ul
AXRole: AXList
a:not([href])
AXRole:
-abbr
+abbr:not([title])
AXRole:
+abbr[title]
+ AXRole: AXUnknown
+
address
AXRole: AXLandmarkContentInfo
code
AXRole:
-del
+del:not([datetime])
AXRole:
+del[datetime]
+ AXRole: AXUnknown
+
dfn
AXRole: AXDefinition
input[type='week']
AXRole: AXTextField
-ins
+ins:not([datetime])
AXRole:
+ins[datetime]
+ AXRole: AXUnknown
+
map
AXRole:
small
AXRole:
-span
+span:not([onclick])
AXRole:
+span[onclick]
+ AXRole: AXUnknown
+
strong
AXRole:
textarea
AXRole: AXTextField
-time
+time:not([datetime])
AXRole:
+time[datetime]
+ AXRole: AXUnknown
+
ul
AXRole: AXList
AXSubrole:
AXRoleDescription:
-abbr
+abbr:not([title])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+abbr[title]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription:
-del
+del:not([datetime])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+del[datetime]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription: text field
-ins
+ins:not([datetime])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+ins[datetime]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription:
-span
+span:not([onclick])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+span[onclick]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription: text entry area
-time
+time:not([datetime])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+time[datetime]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription:
-abbr
+abbr:not([title])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+abbr[title]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription:
-del
+del:not([datetime])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+del[datetime]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription: text field
-ins
+ins:not([datetime])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+ins[datetime]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription:
-span
+span:not([onclick])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+span[onclick]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription: text entry area
-time
+time:not([datetime])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+time[datetime]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription:
-abbr
+abbr:not([title])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+abbr[title]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription:
-del
+del:not([datetime])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+del[datetime]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription: text field
-ins
+ins:not([datetime])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+ins[datetime]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription:
-span
+span:not([onclick])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+span[onclick]
AXRole:
AXSubrole:
AXRoleDescription:
AXSubrole:
AXRoleDescription: text entry area
-time
+time:not([datetime])
+ AXRole:
+ AXSubrole:
+ AXRoleDescription:
+
+time[datetime]
AXRole:
AXSubrole:
AXRoleDescription:
+2014-12-03 Joanmarie Diggs <jdiggs@igalia.com>
+
+ AX: [ATK] Inline text elements with accessible object attributes and/or event handlers are not exposed
+ https://bugs.webkit.org/show_bug.cgi?id=139071
+
+ Reviewed by Chris Fleizach.
+
+ Adds a new InlineRole accessibility role type for non-focusable inline
+ elements which have an event handler or attribute suggesting possible
+ inclusion by the platform. This is mapped to ATK_ROLE_STATIC for GTK and
+ EFL. On the Mac, it is currently ignored to preserve existing behavior.
+
+ Added new test cases to the existing roles-exposed.html test.
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::supportsDatetimeAttribute): Added.
+ * accessibility/AccessibilityObject.h: Added InlineRole.
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::determineAccessibilityRole): Handle InlineRole.
+ * accessibility/atk/AccessibilityObjectAtk.cpp:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Include InlineRole objects.
+ * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+ (atkRole):
+ * accessibility/mac/AccessibilityObjectMac.mm:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Ignore InlineRole objects.
+ * html/HTMLTagNames.in: Added 'time'.
+
2014-12-03 Jer Noble <jer.noble@apple.com>
[Mac] Hang when calling -[AVAsset resolvedURL].
return false;
}
+bool AccessibilityObject::supportsDatetimeAttribute() const
+{
+ return hasTagName(insTag) || hasTagName(delTag) || hasTagName(timeTag);
+}
+
Element* AccessibilityObject::element() const
{
Node* node = this->node();
HelpTagRole,
HorizontalRuleRole,
IgnoredRole,
+ InlineRole,
ImageRole,
ImageMapRole,
ImageMapLinkRole,
virtual bool hasUnderline() const { return false; }
bool hasHighlighting() const;
+ bool supportsDatetimeAttribute() const;
+
virtual bool canSetFocusAttribute() const { return false; }
virtual bool canSetTextRangeAttributes() const { return false; }
virtual bool canSetValueAttribute() const { return false; }
if (supportsARIAAttributes() || canSetFocusAttribute())
return GroupRole;
+ // InlineRole is the final fallback before assigning UnknownRole to an object. It makes it
+ // possible to distinguish truly unknown objects from non-focusable inline text elements
+ // which have an event handler or attribute suggesting possible inclusion by the platform.
+ if (is<RenderInline>(*m_renderer)
+ && (hasAttributesRequiredForInclusion()
+ || (node && node->hasEventListeners())
+ || (supportsDatetimeAttribute() && !getAttribute(datetimeAttr).isEmpty())))
+ return InlineRole;
+
return UnknownRole;
}
if (role == UnknownRole)
return IgnoreObject;
+ if (role == InlineRole)
+ return IncludeObject;
+
// Lines past this point only make sense for AccessibilityRenderObjects.
RenderObject* renderObject = renderer();
if (!renderObject)
case DescriptionListDetailRole:
return ATK_ROLE_DESCRIPTION_VALUE;
#endif
+#if ATK_CHECK_VERSION(2, 15, 2)
+ case InlineRole:
+ return ATK_ROLE_STATIC;
+#endif
default:
return ATK_ROLE_UNKNOWN;
}
if (roleValue() == UnknownRole && !isAttachment())
return IgnoreObject;
+ if (roleValue() == InlineRole)
+ return IgnoreObject;
+
if (RenderObject* renderer = this->renderer()) {
// The legend element is ignored if it lives inside of a fieldset element that uses it to generate alternative text.
if (renderer->isLegend()) {
tfoot interfaceName=HTMLTableSectionElement
th interfaceName=HTMLTableCellElement
thead interfaceName=HTMLTableSectionElement
+time interfaceName=HTMLElement
title
tr interfaceName=HTMLTableRowElement
track wrapperOnlyIfMediaIsAvailable, conditional=VIDEO_TRACK
+2014-12-03 Joanmarie Diggs <jdiggs@igalia.com>
+
+ AX: [ATK] Inline text elements with accessible object attributes and/or event handlers are not exposed
+ https://bugs.webkit.org/show_bug.cgi?id=139071
+
+ Reviewed by Chris Fleizach.
+
+ Add string value for ATK_ROLE_STATIC in roleToString.
+
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+
2014-12-03 Renato Nagy <rnagy@inf.u-szeged.hu>
check-webkit-style is confused by ternary expression inside first member initializer
case ATK_ROLE_DESCRIPTION_VALUE:
return "AXDescriptionValue";
#endif
+#if ATK_CHECK_VERSION(2, 15, 2)
+ case ATK_ROLE_STATIC:
+ return "AXStatic";
+#endif
default:
// We want to distinguish ATK_ROLE_UNKNOWN from a known AtkRole which
// our DRT isn't properly handling.