New issue
Advanced search Search tips

Issue 695214 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

[DevTools A11y] (sometimes) can't handle newline in aria-labelledby

Reported by vince.ma...@snapretail.com, Feb 22 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

Steps to reproduce the problem:
1. Create an element with an aria-labelledby attribute that has more than one id references.
2. Insert a newline immediately after one of the id references.

```
<input
  type="checkbox"
  aria-labelledby="label-1
                   label-2"
>
<p id="label-1">Label #1</p>
<p id="label-2">Label #2</p>
```

What is the expected behavior?

What went wrong?
Various fields in "Accessibility" > "Computed Properties" can't handle the newline. For the id reference that has the newline after it:
- The content is not included in the resulting "Name".
- There's a "No node with this ID." warning.
- The node is not included in "Labeled by".

Did this work before? N/A 

Chrome version: 56.0.2924.87  Channel: stable
OS Version: 10.0
Flash Version: 

Inserting a space before the newline will result in expected behavior.

 
DevTools A11y bug.PNG
38.1 KB View Download

Comment 1 by ajha@chromium.org, Feb 23 2017

Labels: Needs-Triage-M56
Cc: jmukthavaram@chromium.org
Labels: Needs-Feedback
Thanks for the report!
Unable to reproduce this issue on Windows 10,windows 7 ,mac 10.12.2 & ubuntu 14.04 using chrome reported version(stable)-56.0.2924.87 & canary-58.0.3021.0
vince.malone@,
Could you please let us know if miss any steps or it would be helpful if you provide us a sample test /html file to triage the issue further.

695214.mp4
1.4 MB View Download
To clarify, the bug exists in the "Accessibility" tab (which I know is experimental) and is caused by a newline existing in the value of the aria-labelledby attribute e.g. '<input type="checkbox" aria-labelledby="label-1\n label-2">'.
devtools-a11y-bug.gif
577 KB View Download
Owner: aboxhall@chromium.org
Status: Assigned (was: Unconfirmed)
Status: Started (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5a4f17f1bd358169ff9dadf175a6a67f9dfdb76c

commit 5a4f17f1bd358169ff9dadf175a6a67f9dfdb76c
Author: Alice Boxhall <aboxhall@chromium.org>
Date: Thu Jan 04 18:18:29 2018

Trim IDREFs after splitting, to remove stray newlines and other whitespace chars

Bug:  695214 
Change-Id: Iedddf16ff3a80960d45a7ea2802ad8d550770364
Reviewed-on: https://chromium-review.googlesource.com/846587
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527038}
[add] https://crrev.com/5a4f17f1bd358169ff9dadf175a6a67f9dfdb76c/third_party/WebKit/LayoutTests/accessibility/idref-newlines.html
[modify] https://crrev.com/5a4f17f1bd358169ff9dadf175a6a67f9dfdb76c/third_party/WebKit/Source/modules/accessibility/AXObject.cpp

Status: Fixed (was: Started)

Sign in to add a comment