MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
It would make sense to me to do the same here for the sake of being simple to navigate inside a complex form with the keyboard. The date picker seems simpler to clear than an autocomplete:
I tab into it. In both cases, everything is selected, so pressing delete once empties the field.
I have just selected a value. In both cases, I select all + press delete
I have just selected a value. I spam the delete key, the autocomplete usually has more characters to remove, so is a bit slower.
The clear button is purposefully not in the tabbing order of the web page. Keyboard users can use the Delete or Backspace keys (or first select all the text field's text and then use these keys) to delete the contents of the text field.
Your environment
npx @mui/envinfo
```
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
```
Steps to reproduce
Link to live example: (required)
Steps:
https://github.com/user-attachments/assets/fb386989-7da6-47e0-910e-8b5dbc4cb044
Current behavior
The clear button is in the Tab sequence.
Expected behavior
The clear button is not in the tab sequence.
Context
Started to discuss this in https://github.com/mui/mui-x/pull/13289#discussion_r1721293102.
In the autocomplete we ruled to not have it in the tab sequence:
It would make sense to me to do the same here for the sake of being simple to navigate inside a complex form with the keyboard. The date picker seems simpler to clear than an autocomplete:
More on this: https://scottaohara.github.io/clear-text-field-button/.
Your environment
``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```npx @mui/envinfo
Search keywords: -