https://bugs.webkit.org/show_bug.cgi?id=144702
Reviewed by Chris Fleizach.
Source/WebCore:
Add a new PreRole AccessibilityRole so that per-platform mapping is possible.
Map PreRole to ATK_ROLE_SECTION for Efl and Gtk; to NSAccessibilityGroupRole
for the Mac. Add PreRole to the list of "text type" ATK roles.
No new tests. Existing tests were updated to reflect the corrected mapping.
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::allowsTextRanges):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
(roleIsTextType):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
LayoutTests:
In addition to updating the platform expectations for Efl and Gtk, the computed
roles test needed to be updated because there is not a one-to-one mapping between
the HTML pre element and any ARIA role type.
* accessibility/roles-computedRoleString-expected.txt: Updated.
* accessibility/roles-computedRoleString.html: Updated.
* platform/efl/accessibility/roles-exposed-expected.txt: Updated.
* platform/gtk/accessibility/roles-exposed-expected.txt: Updated.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183932
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-05-07 Joanmarie Diggs <jdiggs@igalia.com>
+
+ AX: [ATK] The pre element should be mapped to ATK_ROLE_SECTION; not ATK_ROLE_PANEL
+ https://bugs.webkit.org/show_bug.cgi?id=144702
+
+ Reviewed by Chris Fleizach.
+
+ In addition to updating the platform expectations for Efl and Gtk, the computed
+ roles test needed to be updated because there is not a one-to-one mapping between
+ the HTML pre element and any ARIA role type.
+
+ * accessibility/roles-computedRoleString-expected.txt: Updated.
+ * accessibility/roles-computedRoleString.html: Updated.
+ * platform/efl/accessibility/roles-exposed-expected.txt: Updated.
+ * platform/gtk/accessibility/roles-exposed-expected.txt: Updated.
+
2015-05-07 Csaba Osztrogonác <ossy@webkit.org>
[EFL] Unreviewed gardening.
PASS: ol -> list.
PASS: li -> listitem.
PASS: p -> .
-PASS: pre -> group.
+PASS: pre -> .
PASS: progress -> progressbar.
PASS: section -> region.
PASS: select:not([multiple]) -> .
<!-- skipped <output> -->
<p data-role="" class="ex">X</p>
<!-- skipped <param> -->
-<pre data-role="group" class="ex">X</pre>
+<pre data-role="" class="ex">X</pre>
<progress data-role="progressbar" class="ex" value="0.75">X</progress>
<q data-role="" class="ex">X</q>
<!-- skipped <ruby/rp/rt> -->
AXRole: AXParagraph
pre
- AXRole: AXGroup
+ AXRole: AXSection
progress
AXRole: AXProgressIndicator
AXRole: AXParagraph
pre
- AXRole: AXGroup
+ AXRole: AXSection
progress
AXRole: AXProgressIndicator
+2015-05-07 Joanmarie Diggs <jdiggs@igalia.com>
+
+ AX: [ATK] The pre element should be mapped to ATK_ROLE_SECTION; not ATK_ROLE_PANEL
+ https://bugs.webkit.org/show_bug.cgi?id=144702
+
+ Reviewed by Chris Fleizach.
+
+ Add a new PreRole AccessibilityRole so that per-platform mapping is possible.
+ Map PreRole to ATK_ROLE_SECTION for Efl and Gtk; to NSAccessibilityGroupRole
+ for the Mac. Add PreRole to the list of "text type" ATK roles.
+
+ No new tests. Existing tests were updated to reflect the corrected mapping.
+
+ * accessibility/AccessibilityObject.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+ * accessibility/atk/AccessibilityObjectAtk.cpp:
+ (WebCore::AccessibilityObject::allowsTextRanges):
+ * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+ (atkRole):
+ (roleIsTextType):
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (createAccessibilityRoleMap):
+
2015-05-07 Dan Bernstein <mitz@apple.com>
<rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
OutlineRole,
ParagraphRole,
PopUpButtonRole,
+ PreRole,
PresentationalRole,
ProgressIndicatorRole,
RadioButtonRole,
if (node && node->hasTagName(captionTag))
return CaptionRole;
+ if (node && node->hasTagName(preTag))
+ return PreRole;
+
#if ENABLE(VIDEO)
if (is<HTMLVideoElement>(node))
return VideoRole;
// Check roles as the last fallback mechanism.
AccessibilityRole role = roleValue();
- return role == ParagraphRole || role == LabelRole || role == DivRole || role == FormRole;
+ return role == ParagraphRole || role == LabelRole || role == DivRole || role == FormRole || role == PreRole;
}
unsigned AccessibilityObject::getLengthForTextRange() const
return ATK_ROLE_BLOCK_QUOTE;
#endif
case DivRole:
+ case PreRole:
return ATK_ROLE_SECTION;
case FooterRole:
return ATK_ROLE_FOOTER;
static bool roleIsTextType(AccessibilityRole role)
{
return role == ParagraphRole || role == HeadingRole || role == DivRole || role == CellRole
- || role == LinkRole || role == WebCoreLinkRole || role == ListItemRole;
+ || role == LinkRole || role == WebCoreLinkRole || role == ListItemRole || role == PreRole;
}
static guint16 getInterfaceMaskFromObject(AccessibilityObject* coreObject)
{ BlockquoteRole, NSAccessibilityGroupRole },
{ SwitchRole, NSAccessibilityCheckBoxRole },
{ SearchFieldRole, NSAccessibilityTextFieldRole },
+ { PreRole, NSAccessibilityGroupRole },
};
AccessibilityRoleMap& roleMap = *new AccessibilityRoleMap;