WebKit Bugzilla
Attachment 340051 Details for
Bug 185498
: AX: accessibleNameForNode should simplify whitespace when using innerText
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185498-20180509195004.patch (text/plain), 4.75 KB, created by
Joanmarie Diggs
on 2018-05-09 16:50:05 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Joanmarie Diggs
Created:
2018-05-09 16:50:05 PDT
Size:
4.75 KB
patch
obsolete
>Subversion Revision: 231482 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 9978f968a09a6e95f12bfc811c4711f7d5951d57..311bc96223f79f803f7c9f8349211868311c4eb1 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2018-05-09 Joanmarie Diggs <jdiggs@igalia.com> >+ >+ AX: accessibleNameForNode should simplify whitespace when using innerText >+ https://bugs.webkit.org/show_bug.cgi?id=185498 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: accessibility/text-alternative-calculation-from-unrendered-table.html >+ >+ Call simplifyWhiteSpace() before returning the innerText value. >+ >+ * accessibility/AccessibilityNodeObject.cpp: >+ (WebCore::accessibleNameForNode): >+ > 2018-05-07 Zalan Bujtas <zalan@apple.com> > > [LFC] Add FormattingContext::layoutOutOfFlowDescendants implementation >diff --git a/Source/WebCore/accessibility/AccessibilityNodeObject.cpp b/Source/WebCore/accessibility/AccessibilityNodeObject.cpp >index db8575e1033df7e8aced92397d8bc054d666b5ac..9a58fbf3c8c1b780799b3cb59832057a0bd3f249 100644 >--- a/Source/WebCore/accessibility/AccessibilityNodeObject.cpp >+++ b/Source/WebCore/accessibility/AccessibilityNodeObject.cpp >@@ -1950,7 +1950,7 @@ static String accessibleNameForNode(Node* node, Node* labelledbyNode) > if (axObject->accessibleNameDerivesFromContent()) > text = axObject->textUnderElement(AccessibilityTextUnderElementMode(AccessibilityTextUnderElementMode::TextUnderElementModeIncludeNameFromContentsChildren, true, labelledbyNode)); > } else >- text = element.innerText(); >+ text = element.innerText().simplifyWhiteSpace(); > > if (!text.isEmpty()) > return text; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index f5d402b11d985e10e7324f44f523019ac6b3e767..fadffe83282d430ac658dae16a8fbfa66d374655 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-09 Joanmarie Diggs <jdiggs@igalia.com> >+ >+ AX: accessibleNameForNode should simplify whitespace when using innerText >+ https://bugs.webkit.org/show_bug.cgi?id=185498 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * accessibility/text-alternative-calculation-from-unrendered-table-expected.txt: Added. >+ * accessibility/text-alternative-calculation-from-unrendered-table.html: Added. >+ > 2018-05-07 Chris Dumez <cdumez@apple.com> > > Unreviewed, add frame name in form-iframe-target-before-load-crash.html >diff --git a/LayoutTests/accessibility/text-alternative-calculation-from-unrendered-table-expected.txt b/LayoutTests/accessibility/text-alternative-calculation-from-unrendered-table-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..305babad6dbc82740137bc2baf839e9eafc02a61 >--- /dev/null >+++ b/LayoutTests/accessibility/text-alternative-calculation-from-unrendered-table-expected.txt >@@ -0,0 +1,11 @@ >+This tests text alternative calculation from an unrendered table. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+Test 1 - W3C Name: cell 1 cell 2 cell 3 >+Test 2 - W3C Description: cell 1 cell 2 cell 3 >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/accessibility/text-alternative-calculation-from-unrendered-table.html b/LayoutTests/accessibility/text-alternative-calculation-from-unrendered-table.html >new file mode 100644 >index 0000000000000000000000000000000000000000..91fdf99bee88ebdd4db717ff30f8c08dfe0cf13d >--- /dev/null >+++ b/LayoutTests/accessibility/text-alternative-calculation-from-unrendered-table.html >@@ -0,0 +1,41 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../resources/js-test-pre.js"></script> >+<script src="../resources/accessibility-helper.js"></script> >+</head> >+<body> >+<div id="content"> >+ <input id="test1" type="text" aria-labelledby="hidden" /> >+ <input id="test2" type="text" aria-describedby="hidden" /> >+ <div style="display:none;"> >+ <div id="hidden"> >+ <table> >+ <tr> >+ <td>cell 1</td> >+ <td><div>cell 2</div></td> >+ <td>cell 3</td> >+ </tr> >+ </table> >+ </div> >+ </div> >+</div> >+<p id="description"></p> >+<div id="console"></div> >+ >+<script> >+ description("This tests text alternative calculation from an unrendered table."); >+ if (window.accessibilityController) { >+ var test1 = accessibilityController.accessibleElementById("test1"); >+ debug("Test 1 - W3C Name: " + platformValueForW3CName(test1)); >+ >+ var test2 = accessibilityController.accessibleElementById("test2"); >+ debug("Test 2 - W3C Description: " + platformValueForW3CDescription(test2)); >+ >+ document.getElementById("content").style.visibility = "hidden"; >+ } >+</script> >+ >+<script src="../resources/js-test-post.js"></script> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185498
: 340051