fix: react-doctor modal/dialog/dropzone a11y — 18 files to role+tabIndex+onKeyDown or dialog
This commit is contained in:
@@ -807,7 +807,7 @@ function NexusStateInput({
|
||||
onChange={(e) => { if (e.target.value) addState(e.target.value); }}
|
||||
options={[
|
||||
{ value: "", label: "Add state" },
|
||||
...US_STATES.filter((s) => !value.includes(s)).map((s) => ({ value: s, label: s })),
|
||||
...US_STATES.flatMap((s) => (value.includes(s) ? [] : [{ value: s, label: s }])),
|
||||
]}
|
||||
/>
|
||||
</AdminInput>
|
||||
@@ -886,6 +886,13 @@ export function LogoUploadField({
|
||||
/>
|
||||
|
||||
<div
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter" || e.key === " ") {
|
||||
(e.currentTarget.querySelector('input[type="file"]') as HTMLInputElement | null)?.click();
|
||||
}
|
||||
}}
|
||||
onDragOver={(e) => { e.preventDefault(); setDragOver(true); }}
|
||||
onDragLeave={() => setDragOver(false)}
|
||||
onDrop={handleDrop}
|
||||
|
||||
Reference in New Issue
Block a user