Issue metadata
Sign in to add a comment
|
Datetime-local spinners should have appropriate accessible name and description
Reported by
hani....@gmail.com,
Jul 11 2017
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 Steps to reproduce the problem: 1. Create a blank page that has the below code or use this existing jsfiddle: https://jsfiddle.net/f9yqhexd/ <label for="datetime">Value</label> <input id="datetime" type="datetime-local" aria-labelledby="datetime" /> 2. Have Microsoft's Inspect tool or any similar, and tab to the datetime control 3. Notice that the "Name" property is null for all spinner controls (i.e. mm, /, dd, etc.) What is the expected behavior? The name should be "mm", "dd", etc. What went wrong? As per what I found here: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/forms/DateTimeFieldElement.cpp?q=DateTimeFieldElement.cpp&sq=package:chromium&l=1 these are the only aria attributes being set: setAttribute(aria_valuetextAttr, AtomicString(VisibleValue())); setAttribute(aria_valueminAttr, AtomicString::Number(ax_minimum)); setAttribute(aria_valuemaxAttr, AtomicString::Number(ax_maximum)); setAttribute(aria_helpAttr, AtomicString(ax_help_text)); I believe the name should be added as well. Did this work before? No Does this work in other browsers? Yes Chrome version: 59.0.3071.115 Channel: stable OS Version: 10.0 Flash Version:
,
Jul 13 2017
So that it can be correctly read by screen readers. There's a similar issue opened over here https://bugs.chromium.org/p/chromium/issues/detail?id=741077 but I'm not sure if it's 100% the same or not In my scenario, I've tried Microsoft Narrator as well and the narration is: "Value, Editable Spinner, mm"
,
Jul 13 2017
Thank you for providing more feedback. Adding requester "tkent@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 14 2017
I see. The control has aria-help attribute and it is mapped to LegacyIAccessible.Description, but Narrator doesn't tell it. I think this is an issue in Chromium's ax layer.
,
Jul 17 2017
Let me modify the initial example to make the semantics a bit more clear:
<label for="datetime">When do you want to pick up your car?</label>
<input id="datetime" type="datetime-local" aria-labelledby="datetime" />
When the user tabs to one of the fields in the datetime control, there are *three* pieces of information they need: the overall label for the control ("When do you want to pick up your car?", in my example), the accessible label for the current sub-element (like Month, Day, or Year), and the current value for the current sub-element (2017).
I believe the intent of our implementation is to map the overall label to the MSAA Name, the sub-element label to the MSAA Description, and the sub-element value to the MSAA Value.
How does Edge map all three? Does Narrator correctly announce all three when you first tab to such a control?
,
Jul 17 2017
Sure that's fair enough. Here's the transcript on Edge: 1. Focus on control: "When do you want to pick up your car?, editing text, mm/dd/yyyy --:-- -- " 2. Tab: "mm/dd/yyyy button" 3. Tab: "--:-- -- button" It seems that it's rendered a bit differently in Edge.
,
Jul 17 2017
It sounds like one major difference is that in Edge the entire datetime control is one tab stop, in addition to the individual fields. In Chrome, only the individual fields are tab stops. Based on that we can't expect the accessibility to be identical. It looks like Chrome's experience can be improved, but we'll have to figure out the solution that works best to make Chrome's controls accessible and not assume it will be the same as in other browsers.
,
Jul 27 2017
,
Jul 27 2017
This needs careful thought and checking what works with each screen reader. My thought is that there are some generic containers in there, and one of them could be marked with the group role and get the name. This is similar to how a fieldset works. As the screen reader user enters the group the name is read. Each field should probably get the "Month"/"Day" etc. as a name and not a description, because not all screen reader setups read descriptions. I suggest that whoever takes this bug looks at all the common screen reader combinations so that it worksw
,
Jul 28 2017
,
Jul 28 2017
,
Aug 4 2017
,
Aug 4 2017
,
Aug 11 2017
A given field in an <input type=datetime> can have 4 attributes:
* Field label (Month)
* Placeholder (mm)
* Label of input element ("Departure date")
* Secondary description of input element (e.g. tooltip from "title" attribute)
@aleventhal and I compared other browsers (no good examples to choose from) and tried out some possible options with JAWS, NVDA, and VoiceOver.
Our consensus is that the Month field should get these accessible attributes:
Name=("Month", and Name of input field appended together)
Placeholder=MM
Description=Description from input field
It's not perfect, but basically every screen reader reads the name first, so appending the name of the field and the name of the input element really seemed to be the best for users.
There are other permutations that would work. We rejected any option that would drop any text that would have been read out for a different field.
,
Aug 14 2017
,
Aug 14 2017
,
Dec 14 2017
,
Dec 15 2017
Spinners work similar to combo boxe
,
Jul 9
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b74c8a468c5661a097b439362fc63567fa96c802 commit b74c8a468c5661a097b439362fc63567fa96c802 Author: Dominic Mazzoni <dmazzoni@chromium.org> Date: Mon Jul 09 17:18:30 2018 Fix a11y of time/date controls, remove aria-help attr The various HTML5 date, time, and datetime controls use multiple fields representing things like the month, day, hour, or minutes inside of a single <input> element. Each field is a "spinner", it can be incremented or decremented using the up/down arrows. To ensure these are fully accessible on all platforms, the accessible name, description, and value need to take into account both the author-supplied labels that apply to the <input> element, and the labels for the individual spinner fields too. Fixing this also allows us to get rid of aria-help, which was never part of the ARIA standard but was used here for legacy reasons. Bug: 741158 , 287607 Change-Id: I7e4fe0231141a2fd06b3fbe985537c1eb4bc6e4d Reviewed-on: https://chromium-review.googlesource.com/612687 Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#573346} [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/content/test/data/accessibility/html/input-datetime-local-expected-win.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/content/test/data/accessibility/html/input-month-expected-blink.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/content/test/data/accessibility/html/input-month-expected-mac.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/content/test/data/accessibility/html/input-time-expected-blink.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/content/test/data/accessibility/html/input-time-expected-mac.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/content/test/data/accessibility/html/input-time-expected-win.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/content/test/data/accessibility/html/input-week-expected-blink.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/content/test/data/accessibility/html/input-week-expected-mac.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/content/test/data/accessibility/html/input-week-expected-win.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/calendar-picker/date-picker-ax-expected.txt [delete] https://crrev.com/73cc1f2a4d6b99b06b64bacc09adf52dbcae4246/third_party/WebKit/LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-ax-aria-attributes-expected.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-ax-aria-attributes.html [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-ax-value-changed-notification-expected.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-ax-value-changed-notification.html [delete] https://crrev.com/73cc1f2a4d6b99b06b64bacc09adf52dbcae4246/third_party/WebKit/LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-ax-aria-attributes-expected.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-ax-aria-attributes.html [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-ax-value-changed-notification-expected.txt [delete] https://crrev.com/73cc1f2a4d6b99b06b64bacc09adf52dbcae4246/third_party/WebKit/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-aria-attributes-expected.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-aria-attributes.html [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-value-changed-notification-expected.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/resources/multiple-fields-ax-aria-attributes.js [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/suggested-value-expected.txt [delete] https://crrev.com/73cc1f2a4d6b99b06b64bacc09adf52dbcae4246/third_party/WebKit/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-ax-aria-attributes-expected.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-ax-aria-attributes.html [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-ax-value-changed-notification-expected.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-ax-value-changed-notification.html [delete] https://crrev.com/73cc1f2a4d6b99b06b64bacc09adf52dbcae4246/third_party/WebKit/LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-ax-aria-attributes-expected.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-ax-aria-attributes.html [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-ax-value-changed-notification-expected.txt [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/WebKit/LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-ax-value-changed-notification.html [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/blink/renderer/core/html/forms/date_time_field_element.cc [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/blink/renderer/core/html/forms/date_time_field_element.h [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/blink/renderer/core/html/forms/date_time_numeric_field_element.cc [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/blink/renderer/core/html/forms/date_time_numeric_field_element.h [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/blink/renderer/core/html/forms/date_time_symbolic_field_element.cc [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/blink/renderer/core/html/forms/date_time_symbolic_field_element.h [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/blink/renderer/modules/accessibility/ax_node_object.cc [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/blink/renderer/modules/accessibility/ax_node_object.h [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/blink/renderer/modules/accessibility/ax_object.cc [modify] https://crrev.com/b74c8a468c5661a097b439362fc63567fa96c802/third_party/blink/renderer/modules/accessibility/ax_object.h
,
Jul 9
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by tkent@chromium.org
, Jul 11 2017Labels: Needs-Feedback