Bug 185498 - AX: accessibleNameForNode should simplify whitespace when using innerText
Summary: AX: accessibleNameForNode should simplify whitespace when using innerText
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joanmarie Diggs
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-05-09 16:48 PDT by Joanmarie Diggs
Modified: 2018-05-09 18:50 PDT (History)
9 users (show)

See Also:


Attachments
Patch (4.75 KB, patch)
2018-05-09 16:50 PDT, Joanmarie Diggs
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joanmarie Diggs 2018-05-09 16:48:12 PDT
Given this test case:

  <input id="test" type="text" aria-labelledby="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>

The accessible name calculated for the element with id of "test" should be "cell 1 cell 2 cell 3" without new line characters or additional spaces. We're adding both because accessibleNameForNode falls back on innerText when there is no AccessibilityObject, and there is no AccessibilityObject because the element from which the name is to be calculated is not rendered.
Comment 1 Joanmarie Diggs 2018-05-09 16:50:05 PDT
Created attachment 340051 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2018-05-09 17:36:33 PDT
<rdar://problem/40113814>
Comment 3 WebKit Commit Bot 2018-05-09 18:50:00 PDT
Comment on attachment 340051 [details]
Patch

Clearing flags on attachment: 340051

Committed r231627: <https://trac.webkit.org/changeset/231627>
Comment 4 WebKit Commit Bot 2018-05-09 18:50:01 PDT
All reviewed patches have been landed.  Closing bug.