Datetime widget a11y - #6808
Conversation
…DatePicker for react-dates
✅ Deploy Preview for plone-components canceled.
|
stevepiercy
left a comment
There was a problem hiding this comment.
A syntax change on the changelog, and a question about the message.
| msgid "private" | ||
| msgstr "" | ||
|
|
||
| #. Default: "Navigate forward to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates." |
There was a problem hiding this comment.
I don't understand. How do I "navigate forward"? Is that a mouse click, tap, or keyboard shortcut?
There was a problem hiding this comment.
Hey @stevepiercy , I did not change the phrase, I just placed it inside our code to translate it into other languages. This message is read when we enter the date picker.

I can’t tell you what the logic behind it, it comes from the react-dates library: https://github.com/react-dates/react-dates/blob/master/src/defaultPhrases.js
There was a problem hiding this comment.
Is this the library we're using for a date picker? Sorry, I don't know.
See this line and its key.
const keyboardForwardNavigationInstructions = 'Navigate forward to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates.';We also have existing messages for what appears to be the same thing.
It has a backward counterpart in the next line.
Move backward to switch to the previous month.
I assume that navigation messages should be more descriptive and only for the icon. If so, then I'd use something like the following messages.
- back:
Tap or left arrow key to navigate backward in the calendar. On a selected date, tap or enter or return key to pick it. - forward:
Tap or right arrow key to navigate forward in the calendar. On a selected date, tap or enter or return key to pick it. - info:
Tap or question mark key to reveal keyboard shortcuts. Tap the close or "X" icon or the esc key to hide keyboard shortcuts.
I'm not sure whether we've adopted "tap", "press", or "click" for that gesture to satisfy both desktop and mobile UIs. Another thing for the accessibility guide! I'm also not sure whether we do anything to the names of keys to make them more accessible, such as in MyST I would do the following.
{kbd}`Return`
Co-authored-by: Steve Piercy <web@stevepiercy.com>
|
Also needs an update to the unit test snapshots |
|
Hi There! 👋 We haven't seen any activity on this pull request in a while 😴, and we want to make sure that it's still relevant. Please let us know by:
Otherwise close this pull request. 🧹 |

Improved accessibility for the ‘Datetime-Widget’ component by adding an ‘aria-label’ and a translation for the ‘screenReaderInputMessage’.
PR Volto 17: #6793