Improve SelectTranslationsPanel translate via keyboard navigation
Categories
(Firefox :: Translations, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox127 | --- | fixed |
People
(Reporter: nordzilla, Assigned: nordzilla)
References
Details
Attachments
(3 files, 1 obsolete file)
Description
When initially talking to the a11y team about how translate should work when selecting a dropdown menu directly via keyboard, they said it would make sense to translate when the menulist gets a blur event.
This is the overall right idea, but it makes it awkward if you've just changed the from-language
and then you tab over to change the to-language
. The fromMenuList
receives its blur event, and then it starts translating.
A better heuristic would be if the textarea receives focus after a direct keyboard language change. This way the user can Tab
or Shift + Tab
between the two language menu lists and a translation won't trigger until they Tab
onto the textarea where they expect the translation to occur.
Steps to implement
- Remove the translate on blur event from the menu list on direct language change.
- Add a translate on focus event to the textarea on direct language change.
Tests to implement
- Ensure that the test cases cover both conditions of pressing
Enter
to translate, or focusing thetextarea
element.
Assignee | ||
Comment 1•10 months ago
|
||
Updated•10 months ago
|
Assignee | ||
Comment 2•10 months ago
|
||
Reworks the SelectTranslationsPanel translate on keyboard
navigation events to translate when the textarea is focused
after a langauge change, instead of on when the menu list
is blurred.
Updated•10 months ago
|
Updated•10 months ago
|
Assignee | ||
Comment 3•10 months ago
|
||
Depends on D208417
Updated•10 months ago
|
Assignee | ||
Comment 4•10 months ago
|
||
Ensures that the focus shifts back to the last-interacted
menu list if the translation fails, so that users utilizing
keyboard navigation can pick up where they left off.
Updated•10 months ago
|
https://hg.mozilla.org/mozilla-central/rev/80b35b690e46
https://hg.mozilla.org/mozilla-central/rev/cd9227638299
https://hg.mozilla.org/mozilla-central/rev/0273961a00f1
Description
•