Issue metadata
Sign in to add a comment
|
Text fields should expose accessible name/label/hint even when text is entered on Android
Reported by
splinte...@gmail.com,
Mar 31 2017
|
||||||||||||||||||||||||
Issue descriptionSteps to reproduce the problem: 1. turn on TalkBack 2. set focus on the inputs which only have a placeholder and title, respectively, to label them; note that the placeholder and title are announced as the input's name (e.g. TalkBack would announce "Edit box, This is the placeholder") 3. enter a value in the inputs 4. navigate away from the input (swipe left/right) and back again; note that now the placeholder/title are not announced - instead, TalkBack just announces "Edit box, [whatever the user entered]" What is the expected behavior? In accordance with the HTML Accessibility API Mappings 1.0 "Accessible Name and Description Computation" https://www.w3.org/TR/html-aam-1.0/#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-url-and-textarea-element in the absence of any aria-label, aria-labelledby, <label>, the placeholder, aria-placeholder, title should be used to determine the accessible name of the inputs. What went wrong? Chrome/TalkBack currently does use placeholder, aria-placeholder, title as the name of the input and announces it correctly (e.g. "Edit box, This is the placeholder"), but only if there is no data entered in the input. Once the user entered a value in the input, only the value is announced (e.g. "Edit box, [whatever the user entered]"). Did this work before? No Does this work in other browsers? Yes Chrome version: 59.0.3056.4 Channel: canary OS Version: 6.0.1 Flash Version: Compare the Android/Chrome/TalkBack behavior with Android/Firefox/TalkBack (keeping in mind that Firefox doesn't seem to support aria-placeholder yet). Even when something was entered as a value, the placeholder/title are correctly announced as accessible name when the input receives focus. X-Ref: https://github.com/w3c/html-aam/issues/84
,
Apr 3 2017
Thanks. This is a known issue, it's been tricky because that's how Android behaves natively, so we can't really fix it entirely in Chrome until Android comes up with a platform-wide solution for this.
,
Apr 3 2017
would fixing this not also fix the same problem in android native? to be clear, this only concerns placeholder/title as accessible name when no other better labelling (in html, an actual <label> or an aria-label) is present. if there is already a proper label (and not a fallback to placeholder/title) then the placeholder/title should not be announced when there's a value present
,
Apr 3 2017
But Android doesn't read a <label> either once you enter text in a text field, right?
,
Apr 3 2017
goodness, i took that as a given and it never occurred to me to actually check. that seems to make chrome/android even more fundamentally broken from an accessibility point of view than i thought. is this also due to android platform convention?
,
Apr 3 2017
should i file the fact that the accessible name of the form control isn't announced once data is entered by user as a separate issue/request?
,
Apr 3 2017
attaching a minimal test case for inputs with label and aria-label, and a screenshot comparison of how android/chrome/talkback doesn't announce the accessible name of the input anymore once it has some user-entered value, compared to how android/firefox/talkback behave (which would be the expected behavior, as otherwise a talkback user coming back to a previously filled-in form control would have no way of knowing what that form control actually is/does)
,
Apr 3 2017
Here's the missing piece we need, so finally in Android O it will possible to do this right. https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.html#getHintText() However, I changed my mind - let me work with the TalkBack team and see if we can fix it for text fields sooner than O. This has been an issue for a while.
,
Apr 3 2017
worth renaming the issue to be more general? (i would edit it myself but don't think that's possible in the bug tracker here) something like "accessible name for inputs not announced when user entered a value" or similar. further, i assume this would also affect other text-like inputs (like type="url", type="search", type="email", type="number", ...)?
,
Apr 3 2017
Renamed to be a bit more general.
,
Apr 19 2017
related to this: note that placeholder/aria-placeholder should now NOT take part in the accessible name calculation, per https://github.com/w3c/html-aam/issues/87 aria-label, aria-labelledby, and title, on the other hand, are of course still part of the calculation algorithm, so this part of the bug report is still valid.
,
Jul 26 2017
See 713600 for placeholder discussion. Support is now in TalkBack. Planning to ship this in M62. WIP, just needs tests rebaselined: https://chromium-review.googlesource.com/587868
,
Aug 7 2017
,
Aug 7 2017
,
Aug 7 2017
,
Aug 7 2017
,
Aug 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/16789955f80fef324e6f4a35a00c0cd81fa3d6b8 commit 16789955f80fef324e6f4a35a00c0cd81fa3d6b8 Author: Dominic Mazzoni <dmazzoni@chromium.org> Date: Mon Aug 28 22:32:37 2017 Support AccessibilityNodeInfo.getHintText on Android. For any HTML element that had both primary and secondary accessible text (name and description), such as a form control with both a label and a placeholder, or a link with both link text and a title tooltip, previously we had to stuff those into the same field. Now Android allows us to split them into the main text and a separate "hint" field, which we can now use for all secondary text. For example, <input aria-label="Phone" placeholder="xxx-xxxx"> Previous: GetText -> "Phone xxx-xxxx" New: GetText -> "Phone" GetHintText -> "xxx-xxxx" Bug: 707194 Change-Id: I63e449b418ae4aa8a880feca949c0b7349fff582 Reviewed-on: https://chromium-review.googlesource.com/587868 Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Cr-Commit-Position: refs/heads/master@{#497904} [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/browser/accessibility/accessibility_tree_formatter_android.cc [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/browser/accessibility/browser_accessibility_android.cc [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/browser/accessibility/browser_accessibility_android.h [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/browser/accessibility/dump_accessibility_tree_browsertest.cc [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/browser/accessibility/web_contents_accessibility_android.cc [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatWebContentsAccessibility.java [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/public/android/java/src/org/chromium/content/browser/accessibility/OWebContentsAccessibility.java [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibility.java [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/test/data/accessibility/aria/aria-describedby-expected-android.txt [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/test/data/accessibility/aria/aria-tooltip-expected-android.txt [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/test/data/accessibility/aria/input-text-aria-placeholder-expected-android.txt [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/test/data/accessibility/html/a-name-calc-expected-android.txt [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/test/data/accessibility/html/button-name-calc-expected-android.txt [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/test/data/accessibility/html/checkbox-name-calc-expected-android.txt [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/test/data/accessibility/html/contenteditable-with-no-descendants-expected-android.txt [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/test/data/accessibility/html/input-text-name-calc-expected-android.txt [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/test/data/accessibility/html/input-text-value-expected-android.txt [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/test/data/accessibility/html/input-text-value-expected-blink.txt [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/test/data/accessibility/html/input-text-value-expected-win.txt [modify] https://crrev.com/16789955f80fef324e6f4a35a00c0cd81fa3d6b8/content/test/data/accessibility/html/input-text-value.html
,
Aug 30 2017
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by candr...@chromium.org
, Apr 3 2017Status: Available (was: Unconfirmed)