Closed Bug 1730175 Opened 3 years ago Closed 3 years ago

Date input accessible value not resetting after clearing

Categories

(Core :: Layout: Form Controls, defect)

Firefox 90
defect

Tracking

()

RESOLVED FIXED
94 Branch
Accessibility Severity s3
Tracking Status
firefox94 --- fixed

People

(Reporter: mozilla, Assigned: Jamie)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:92.0) Gecko/20100101 Firefox/92.0

Steps to reproduce:

Enter a date into an <input type=date>
Then either:
a) click the "x" clear button in the date input
b) click a <input type="reset"> button
c) use Javascript to set the value of the <input type=date> to "";

Tried in Firefox v 90 and 94 (Nightly)

Actual results:

Visually, the date reverts to "yyyy-mm-dd", but in the Accessibility properties in the developer tools section still has the date entered above.
Using a screen reader (NVDA and JAWS) the user-entered date is still read.

Expected results:

The accessible properties should have been set back to their default.
Screen readers should read the default date value.

The Bugbug bot thinks this bug should belong to the 'Firefox::Disability Access' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Disability Access

Confirmed. When the fields are cleared, the a11y value should be cleared also.

Status: UNCONFIRMED → NEW
Component: Disability Access → Layout: Form Controls
Ever confirmed: true
Keywords: access
Product: Firefox → Core
Whiteboard: [access-s3]
See Also: → 1730431

I'm also puzzled as to why the Clear button is not tabbable. I don't see another way to activate it from the keyboard.

Before this patch, we didn't set aria-valuetext when the value was initially empty, nor did we clear it after a value was set and subsequently cleared.
Now, we set aria-valuetext to the placeholder in either of these cases; e.g. "dd" for the day field.
This is a little controversial: normally, we like to semantically differentiate between values and placeholders.
However, we weren't exposing the placeholder at all before and placeholder doesn't seem to be well supported on spinbuttons by screen readers.
Also, missing aria-value* for a spinbutton means no value, but it's unclear how that should be exposed to a11y clients.
Exposing "0" (as Chromium does) seems ugly at best, incorrect at worst.

Assignee: nobody → jteh
Status: NEW → ASSIGNED
See Also: → 1730437

Setting severity to S3; although this seems minor at first glance, it could actually be quite misleading for screen-reader users.

Severity: -- → S3
Attachment #9240849 - Attachment description: Bug 1730175: Set aria-valuetext to the placeholder on datetime fields when the input is cleared. → Bug 1730175: Set aria-valuetext to "" on numeric datetime fields when the input is cleared.
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c8bcdcdc5fd7
Set aria-valuetext to "" on numeric datetime fields when the input is cleared. r=emilio,eeejay

Backed out for causing mochitest failures in test_datetime.html

Backout link

Push with failures

Failure log

Flags: needinfo?(jteh)
Flags: needinfo?(jteh)
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e1b6434d31e4
Set aria-valuetext to "" on numeric datetime fields when the input is cleared. r=emilio,eeejay
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
Accessibility Severity: --- → s3
Whiteboard: [access-s3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: