Open Bug 1779954 Opened 2 years ago Updated 1 month ago

Accessibility panel shows "text-label" warnings on time input internal spinbutton

Categories

(DevTools :: Accessibility Tools, defect, P3)

Firefox 102
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: hi, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0

Steps to reproduce:

Go to a website with a time input field.
Right click on the time input field,
then click 'Inspect Accessibility Properties'.
It is displaying error messages when there should be none.

I have disabled all my add-ons, and checked I have the latest version available and the problem is still there.

Example website
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Accessibility Time Bug</title>
</head>
<body>
<input type="time" />
</body>
</html>

Actual results:

The time editor
Complains "Clickable elements must be focusable and should have interactive semantics"

It's children; Hours, Minutes, AM/PM
Complains "Form elements should have a visible text label"

Expected results:

It should not display any errors because the built-in input field should always be accessible.
Or its a bug with the Accessibility Inspector

Adding a label does not help.
<label for="my_time">Enter time:</label>
<input id="my_time" type="time" />

The Bugbug bot thinks this bug should belong to the 'DevTools::Accessibility Tools' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Accessibility Tools
Product: Firefox → DevTools

I can reproduce going to this URL: data:text/html,<meta charset=utf8><label>Enter time:<input type="time"></label>

Looks like it could be similar to Bug 1555551

Summary: <input type = "time" /> Inspect accessibility shows errors → Accessibility panel shows "text-label" warnings on time input internal spinbutton

(In reply to dean from comment #0)

It should not display any errors because the built-in input field should always be accessible.

If there's no label on the time field, this is still an authoring error because the user doesn't necessarily know what time they're being asked to enter, in the same way that a missing label on an email address input is a problem. As a practical example, if there are two time inputs on a page, one for departure and one for arrival, the user can't know which is which without a label. The Inspector should flag this one.

(In reply to dean from comment #1)

Adding a label does not help.

This one is a bug in the Inspector. It doesn't recognise that a time input is a compound control. We're going to need to special case this somehow.

Implementation note: A time input is exposed in the a11y tree as a container with role GROUPING and object attribute text-input-type:time. In this case, we should:

  1. Not require focusability or interactive semantics on the grouping.
  2. Warn for a missing visual label on the grouping.
  3. Not warn for a missing visual label on the children.
Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.