New issue
Advanced search Search tips

Issue 828175 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug
Team-Accessibility



Sign in to add a comment

Chrome is not calling setLabelFor() and setLabeledBy() on virtual ids

Project Member Reported by felipeal@google.com, Apr 2 2018

Issue description

These methods (https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.html#setLabelFor(android.view.View,%20int)) were added on JellyBean / API 17, but looks like Chrome is not calling them. 
 
Components: UI>Accessibility>Compatibility
Labels: -Pri-2 OS-Android Pri-3
Status: Available (was: Untriaged)
Unfortunately it looks like we can't support labeledBy and labelFor very easily.

The problem is that TalkBack appends that information to the text.

They gave me an example: Suppose we have a button with content description "submit", and it's labeled by an TextView with text "questionnaire". The full description of the button becomes "Submit button for questionnaire".

The problem is that on the web we have a lot of corner cases we need to support - like <input aria-labelledby="mylabel"> where "mylabel" points to a node that's hidden / invisible - the web a11y specs say that we're supposed to compute the text from mylabel as if it was visible and make that the accessible name of the text box.

There are a bunch of other cases like nodes labeled by multiple other nodes (not just one), and multiple sources of text that have to be combined in just the right way.

I think the best we could hope to do is that in very limited circumstances, when there are no corner cases, we could use labeledBy *instead of* exposing the label directly - and the rest of the time we'd fall back on our own label calculation.

Leaving open but low priority for now.

Owner: ----

Sign in to add a comment