mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-13 20:57:36 -06:00
[bugfix] Fixes to tablist, fileinput, checkbox (#4139)
Some fixes to various frontend things: - Fix signup checkbox being height 0 on webkit - closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4136 - Fix wonky file input on chrome and webkit - closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4138 - Make tablist in interaction policies keyboard accessible with proper left/right + focus handling, see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/tablist_role Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4139 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
This commit is contained in:
parent
73aa62581e
commit
4a6b357501
4 changed files with 85 additions and 45 deletions
|
|
@ -71,9 +71,6 @@ export default function ImportExportForm({ form, submitParse, parseResult }: Imp
|
|||
}, [exportResult]);
|
||||
|
||||
const importFileRef = useRef<HTMLInputElement>(null);
|
||||
const importFileOnClick = () => {
|
||||
importFileRef.current?.click();
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
@ -109,11 +106,9 @@ export default function ImportExportForm({ form, submitParse, parseResult }: Imp
|
|||
<label
|
||||
className={`button with-icon${form.permType.value === undefined || form.permType.value.length === 0 ? " disabled" : ""}`}
|
||||
tabIndex={0}
|
||||
onClick={importFileOnClick}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
importFileOnClick();
|
||||
importFileRef.current?.click();
|
||||
}
|
||||
}}
|
||||
role="button"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue