Closed Bug 1799018 Opened 2 years ago Closed 2 years ago

HTML Markup Map to support datetime inputs

Categories

(Core :: Disability Access APIs, defect)

All
Unspecified
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ayeddi, Unassigned, Mentored)

References

Details

(Keywords: access)

The type=datetime should be included in the HTMLMarkupMap to create an accessible with role DATE_EDITOR, as expected. While this type is deprecated, there are still websites out there that use it.

Otherwise, this intermittently fails tests like accessible/tests/mochitest/value/test_datetime.html because there is no accessible to return, spinbuttons and text leafs are appended directly to the document instead of a text container.

Test fails with the following message:
INFO - TEST-UNEXPECTED-FAIL | accessible/tests/mochitest/value/test_datetime.html | Can't get accessible for [ 'input@id="datetime" node', address: [object HTMLInputElement] ]

So I'm a bit confused by this. If I do:
data:text/html,<input type="datetime">
I just get a text input, not a date/time input (no spin buttons, etc.). Do you get something different if you try this?

Flags: needinfo?(ayeddi)

(In reply to James Teh [:Jamie] from comment #1)

So I'm a bit confused by this. If I do:
data:text/html,<input type="datetime">
I just get a text input, not a date/time input (no spin buttons, etc.). Do you get something different if you try this?

Apologies for the confusion here. It actually works the same for me with and without my datepicker patches applied (they triggered the failure of a test resulting in now-fixed bug 1798438.

As you wrote, the datetime falls back to entry / text input nicely, thus I am now waiting for the new Try run to complete to confirm this does not fail anymore - and I'll close the ticket. Or will be very much confused, if the test_datetime.html won't be able to find any accessible on CI again.

Flags: needinfo?(ayeddi)

Just in case this isn't clear, <input> falls back to text for any type that isn't known; <input type="foo"> also yields a text box. If we do have a11y tests for <input type="datetime">, they should probably just be removed.

Confirmed that the test does not fail anymore, thus with the note from Jamie above, closing the bug.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.