Closed Bug 1806684 Opened 1 year ago Closed 1 year ago

When a datepicker panel is closed the keyboard focus should return to the input field

Categories

(Core :: Layout: Form Controls, defect)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ayeddi, Assigned: ayeddi)

References

()

Details

(Keywords: access)

STR

  1. Open a new tab with URI data:text/html,<input type=date><input type=datetime-local>
  2. Open a datepicker panel by either navigating to and activating the Calendar button by pressing Space or Enter or by pressing Space from any of the input's inner fields
  3. When a datepicker panel is opened, either make a selection by pressing Space or close the dialog by pressing Escape to dismiss the panel
  4. Observe the position where a keyboard focus lands

Actual

  1. The keyboard focus is returned to the body of the page. The focus indication thus is not visible. You may press Tab to reveal the focus indication (it would move to the input field after the Tab)

Expected

  1. The keyboard focus is returned to the input field and the focus indication is visible.

Form fields

  1. <input type=date>
  2. <input type=datetime-local>

Notes

  1. The focus could return to the input's inner element that triggered the panel (i.e. a Calendar button) or to the <input> itself to allow users to review the current value of the field as a whole. The Escape or any other way of a dialog's dismissal is expected to close the modal dialog per WAI ARIA Dialog design pattern and return the focus to the triggering element, but this would require a user to navigate back to focusing the entire field to review the value. Thus, it is not clearly required to keep the datepicker panel opened on Escape.
  2. This is likely to be a preexistent behavior that was never testable, because the datepicker was not keyboard accessible before the bug 1676068 was fixed.
Assignee: nobody → ayeddi
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.