Open owi92 opened 3 weeks ago
Well so far I've only got a somewhat hacky feeling band-aid solution for this. That would be to add the following prop to every <Field>
missing the keyboard functionality:
onKeyDown={(event: KeyboardEvent) => {
if (event.key === "Enter" || event.key === "Escape") {
(document.activeElement as HTMLInputElement).blur();
}
}}
I would honestly prefer another solution but haven't got the time right now, so I'll unassign myself for now.
@owi92 Thx for reporting! :)
Many input fields in several modals can be "unfocused" with the
esc
andenter
keys. However this isn't the case for every field since some of them are missing the necessaryonKeyDown
handlers. This is the case for input fields in the modals for "add user", "add group", "add access policy" and "add theme" (but I'm sure there are others as well). Fixing this would increase accessibility, convenience and coherence.Edit: This came up in #619 and was probably also mentioned in serveral a11y related issues.