From 19cfa8d126a2ff54298150529e58e5e4f5495f09 Mon Sep 17 00:00:00 2001
From: tobi <31960611+tsmethurst@users.noreply.github.com>
Date: Wed, 9 Apr 2025 14:14:20 +0200
Subject: [bugfix] Fix a couple accessibility issues with `:focus` elements
(#3979)
* [bugfix/frontend] Fix accessibility/focus issues in settings + web ui
* fix little error
* tweaks
---
web/source/settings/components/form/inputs.tsx | 29 +++++++++++++++++++-------
1 file changed, 21 insertions(+), 8 deletions(-)
(limited to 'web/source/settings/components/form/inputs.tsx')
diff --git a/web/source/settings/components/form/inputs.tsx b/web/source/settings/components/form/inputs.tsx
index 498499db6..c26b88f6a 100644
--- a/web/source/settings/components/form/inputs.tsx
+++ b/web/source/settings/components/form/inputs.tsx
@@ -17,7 +17,7 @@
along with this program. If not, see .
*/
-import React from "react";
+import React, { useRef } from "react";
import type {
ReactNode,
@@ -119,23 +119,36 @@ export interface FileInputProps extends React.DetailedHTMLProps<
}
export function FileInput({ label, field, ...props }: FileInputProps) {
- const { onChange, ref, infoComponent } = field;
+ const ref = useRef(null);
+ const { onChange, infoComponent } = field;
const id = nanoid();
+ const onClick = () => {
+ ref.current?.click();
+ };
return (
-
-