Use Escape to close month-year panel only and keep the datepicker open
Categories
(Core :: Layout: Form Controls, enhancement)
Tracking
()
People
(Reporter: ayeddi, Assigned: ayeddi)
References
(Blocks 1 open bug, )
Details
(Keywords: access)
Attachments
(2 files)
STR
- Open a new tab with URI
data:text/html,<input type=date><input type=datetime-local>
- Navigate to and activate the Calendar button (introduced with bug 1676068)
- When a datepicker panel is opened, navigate to and activate the month-year toggle button
- Confirm that the month and year selection panel is opened and press (from any keyboard focus position)
Escape
to close it
Actual
- Both month-year and a datepicker panels are closed
- The keyboard focus is returned to the input field
Expected
- Only the month-year selection panel is closed, the datepicker dialog itself remains opened
- The keyboard focus is returned to the month-year toggle button on the datepicker panel
- Month-year toggle button's state is changed from
expanded
tocollapsed
(thearia-expanded
property is set to its default value offalse
)
Form fields
<input type=date>
<input type=datetime-local>
Notes
The Escape
is expected to close the modal dialog per WAI ARIA Dialog design pattern, but because the datepicker panel includes the month-year selection dialog - they both are modal dialogs. While within a DOM, the spinner month-year selection dialog is a descendant of the datepicker dialog (with appropriate ARIA properties being updated when the spinner is opened/closed), for a user it works as the month-year dialog is replacing the datepicker dialog and the latter is not seen from under the former one as well. Thus, it is not clearly required to keep the datepicker panel opened on Escape
.
Yet, this is something that is likely to be expected by a user as the month-year selection is a sub-functionality of the datepicker dialog and by exiting it they are likely to expect to return to the previous level of their work (the datepicker panel) not to the form field itself.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
For <input type=date>
and <input type=datetime-local>
, when a month-year selection dialog is opened from the datepicker/calendar dialog, Escape
now would only close the month-year selection panel and would keep the datepicker open, returning the focus to the focusable day/gridcell on the calendar grid.
Updated•3 years ago
|
Comment 3•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 4•3 years ago
|
||
Reproduced on Nightly 110.0a1 (Build ID: 20221220214632).
I can confirm that now when navigating and interacting with the month-year panel and then using the Escape key will only close the month-year panel and not the datepicker on Firefox 110.0b8 (tested on macOS 11.7, Windows 10, and Ubuntu 20.04.).
However, I noticed that if the month-year panel is only opened without any other kind of interaction the old behavior is still encountered as can be seen in the screen recording.
Anna, is this expected?
Assignee | ||
Comment 5•3 years ago
|
||
(In reply to Simona Badau from comment #4)
Created attachment 9315424 [details]
Screen Recording 2023-02-01 at 19.57.35.movReproduced on Nightly 110.0a1 (Build ID: 20221220214632).
I can confirm that now when navigating and interacting with the month-year panel and then using the Escape key will only close the month-year panel and not the datepicker on Firefox 110.0b8 (tested on macOS 11.7, Windows 10, and Ubuntu 20.04.).However, I noticed that if the month-year panel is only opened without any other kind of interaction the old behavior is still encountered as can be seen in the screen recording.
Anna, is this expected?
@Simona, thank you very much for catching it up! It is not an expected behavior and I will write a patch to fix and test this case.
Comment 6•3 years ago
|
||
(In reply to Anna Yeddi [:ayeddi] from comment #5)
@Simona, thank you very much for catching it up! It is not an expected behavior and I will write a patch to fix and test this case.
Thanks, Ana! I've logged Bug 1815184 to cover this issue.
Based on Comment 4, Comment 5, and on the fact that the new issue is covered by Bug 1815184, marking this as Verified.
Description
•