Decide if pressing Backspace on the Calendar button should reset the date and datetime-local inputs
Categories
(Core :: Layout: Form Controls, enhancement)
Tracking
()
People
(Reporter: ayeddi, Assigned: ayeddi)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
+++ This bug was initially created as a clone of Bug #1804669 +++
Found in
- 109.0a1 (2022-12-08)
Affected versions
- Firefox Nightly 109.0a1 (2022-12-08)
Affected platforms
- Ubuntu, Mac, Windows
**Steps to reproduce [Outdated - see Comment 8] **
- Reach url:
data:text/html,<input type='datetime-local'>
ordata:text/html,<input type='date'>
- Reach the Calendar button using
Tab
keyboard navigation. - Hit the
Backspace
button while focused on the Calendar button.
**Expected result [Outdated - see Comment 8] **
- The selected date should be deleted (the input value to be reset)
Actual result
- (originally) Hitting the
Backspace
key while on the Calendar button will cause it to disappear. - (after the bug 1804669 is fixed) Nothing happens
Regression range
This issue is not a regression. It is an enhancement for the Calendar button, yet, the field used to have a Reset button prior to the Bug 1676068.
Comment 1•2 years ago
|
||
:ayeddi, if you think that's a regression, could you try to find a regression range using for example mozregression?
Assignee | ||
Comment 2•2 years ago
|
||
It is not a regression, but a possible enhancement
Assignee | ||
Comment 3•2 years ago
|
||
Another resolution proposed is to add a Clear
button to the date picker dialog, which would require UI changes and UX approval
Assignee | ||
Comment 4•2 years ago
|
||
While Delete
was not cleaning out the field (i.e. it does not on Firefox 107.0.1), we could also add it alongside the Backspace
option
Assignee | ||
Comment 5•2 years ago
|
||
A workaround to provide opportunity to clear the <input type=date>
and <input type=datetime-local>
while an on-screen button option is being discussed.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 7•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Assignee | ||
Comment 8•2 years ago
•
|
||
Description updated in the course of consulting with the Accessibility, Layout, and DOM teams:
Steps to reproduce
- Reach url:
data:text/html,Date: <input type='date' value='2023-02-23'>, Time: <input type='time' value='12:34'>, Datetime: <input type='datetime-local' value='2023-02-23T12:34'>
- Reach any part of any of these input fields using
Tab
keyboard navigation. - Hit the
Delete
key. - Hit the
Backspace
orDelete
key while holding a modifier key:cmd
on macOS orctrl
on others (Windows, Linux).
[Added] Note: This behavior is not expected to apply for Calendar button.
Expected result
Delete
clears out the editable part of the field that is currently focusedCtrl
/Cmd
+Backspace
/Delete
clears out the entire focused input field (the input value is reset)
Actual result
- Nothing happens
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 9•2 years ago
|
||
Comment on attachment 9314139 [details]
Bug 1806587 - Clear date/time/datetime-local input with Ctrl/Cmd + Delete/Backspace. r=emilio,masayuki
Beta/Release Uplift Approval Request
- User impact if declined: The datepicker accessibility enhancement removed a button to clear the date/datetime-local input field and there were several users requesting to restore this functionality. While an on-screen button on a datepicker panel or similar solution is being discussed with the UX team (tracked in bug 1811187), this patch provides a discoverable keyboard shortcut to clear the entire field, if a user wants to.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: ## Description updated in the course of consulting with the Accessibility, Layout, and DOM teams:
Steps to reproduce
- Reach url:
data:text/html,Date: <input type='date' value='2023-02-23'>, Time: <input type='time' value='12:34'>, Datetime: <input type='datetime-local' value='2023-02-23T12:34'>
- Reach any part of any of these input fields using
Tab
keyboard navigation. - Hit the
Delete
key. - Hit the
Backspace
orDelete
key while holding a modifier key:cmd
on macOS orctrl
on others (Windows, Linux).
Expected result
Delete
clears out the editable part of the field that is currently focusedCtrl
/Cmd
+Backspace
/Delete
clears out the entire focused input field (the input value is reset)
Actual result
- Nothing happens
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The change has low risk, because no UI is changed and only an additional keyboard shortcuts are added which would enhance an existent behavior and would not cause removal or change of existent patterns. The patch includes automatic tests as well and the change was discussed and r+ed by the DOM/keyboard shortcuts team as well to ensure no overlapping functions are affected.
- String changes made/needed: none
- Is Android affected?: No
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 10•2 years ago
|
||
Comment on attachment 9314139 [details]
Bug 1806587 - Clear date/time/datetime-local input with Ctrl/Cmd + Delete/Backspace. r=emilio,masayuki
Approved for our last 110 beta, thanks.
Comment 11•2 years ago
|
||
bugherder uplift |
Comment 12•2 years ago
|
||
This issue is verified as fixed in our latest Beta 110.0b9 (64-bit) as well as our latest Nightly Build 111.0a1 (2023-02-01), However Its mentioned in the description that If a user reaches the Calendar button using tab and then Hits Backspace or Delete.. it should erase all fields.
Ctrl Delete and Ctrl Backspace does in fact erase all fields but only if the user is focused on one of them. Simple Backspace or Delete will only erase the field that the user is focused on which works great, but focusing the Calendar button and then hitting Delete or Backspace does nothing.
@Anna is this intended behavior ?
Assignee | ||
Comment 13•2 years ago
|
||
(In reply to Rares Doghi from comment #12)
This issue is verified as fixed in our latest Beta 110.0b9 (64-bit) as well as our latest Nightly Build 111.0a1 (2023-02-01), However Its mentioned in the description that If a user reaches the Calendar button using tab and then Hits Backspace or Delete.. it should erase all fields.
Ctrl Delete and Ctrl Backspace does in fact erase all fields but only if the user is focused on one of them. Simple Backspace or Delete will only erase the field that the user is focused on which works great, but focusing the Calendar button and then hitting Delete or Backspace does nothing.
@Anna is this intended behavior ?
@Rares, thank you for clarifying it! The Calendar button shortcut was omitted because it would be hard to discover and it is also kind of far for a user to navigate there if they can clear the field via one of elements before.
Apologies for failing to mention it in the updated description earlier - I added a note in the comment #8:
[Added] Note: This behavior is not expected to apply for Calendar button.
Comment 14•2 years ago
|
||
Updating the remaining flags, Thank you for clearing that up! This issue is verified as fixed in our latest Beta and Nightly builds.
Assignee | ||
Comment 15•2 years ago
|
||
[Tracking Requested - why for this release]:
Refer to comment #9
Proposed release note in New
:
Date, time, and datetime-local input fields can now be cleared with Cmd+Backspace and Cmd+Delete shortcut on Mac and Ctrl+Backspace and Ctrl+Delete on Windows and Linux
Comment 16•2 years ago
|
||
Note added to our beta release notes (https://www.mozilla.org/en-US/firefox/110.0beta/releasenotes/) as well as our Final release notes document.
Updated•2 years ago
|
Description
•