New issue
Advanced search Search tips

Issue 741158 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 9
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug
Team-Accessibility

Blocking:
issue 287607



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 description

UserAgent: 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:
 
spinner_screenshot.png
37.5 KB View Download

Comment 1 by tkent@chromium.org, Jul 11 2017

Components: -Blink>Forms Blink>Accessibility Blink>Forms>Datetimelocal
Labels: Needs-Feedback
> I believe the name should be added as well.

Why 'name' should be added? What's a user-facing issue?

Comment 2 by hani....@gmail.com, 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"
Project Member

Comment 3 by sheriffbot@chromium.org, Jul 13 2017

Cc: tkent@chromium.org
Labels: -Needs-Feedback
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

Comment 4 by tkent@chromium.org, Jul 14 2017

Components: -Blink>Forms>Datetimelocal
Labels: -Hotlist-Interop
Status: Available (was: Unconfirmed)
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.

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?

Comment 6 by hani....@gmail.com, 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.
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.

Labels: triage-aaron
Labels: -Pri-2 -triage-aaron Pri-3
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
Blocking: 287607
Labels: -Pri-3 Pri-2
Labels: triage-lpalmaro
Labels: -triage-lpalmaro
Owner: dmazz...@chromium.org
Status: Started (was: Available)
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.


Cc: rbasuvula@chromium.org
 Issue 741077  has been merged into this issue.
Summary: Datetime-local spinners should have appropriate accessible name and description (was: Datetime-local spinners have null aria-label)
Labels: win-a11y
Labels: combo-boxes
Spinners work similar to combo boxe
Project Member

Comment 19 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)

Sign in to add a comment