From 24a2cfc7298d1d4f7d807d3c345d6c9d8eed0706 Mon Sep 17 00:00:00 2001 From: Artem Sushchev Date: Thu, 25 Sep 2025 12:13:10 +0200 Subject: [PATCH] feat: Accessibility Fixes for Custom Field Forms (#48) * fix: add IDs and ARIA labels to custom field forms - Add id propagation to FormInput/FormTextarea based on name prop for proper label association - Enhance FormSelect with hidden input for form submission, aria-labelledby for labeling, and controlled/uncontrolled state management - Add aria-label attributes to inline inputs/selects/checkboxes in CrudTable settings editor These changes improve accessibility for screen readers and ensure custom field forms are fully navigable via keyboard. Also critical for AI browsers like Comet that rely on semantic HTML/ARIA for form parsing and automation. * fix: add aria-labels to CRUD table action buttons - Add aria-label to edit buttons: 'Edit [item name]' - Add aria-label to delete buttons: 'Delete [item name]' - Add aria-label to save/cancel buttons in edit/add modes - Add aria-label to 'Add New' button Fixes unlabeled icon buttons that were inaccessible to screen readers and AI browsers. --- components/forms/simple.tsx | 43 +++++++++++++++++++++++++------ components/settings/crud.tsx | 49 +++++++++++++++++++++++------------- 2 files changed, 67 insertions(+), 25 deletions(-) diff --git a/components/forms/simple.tsx b/components/forms/simple.tsx index c2e9a39..cf92333 100644 --- a/components/forms/simple.tsx +++ b/components/forms/simple.tsx @@ -32,6 +32,7 @@ export function FormInput({ title, hideIfEmpty = false, isRequired = false, ...p {title && {title}} @@ -74,6 +75,7 @@ export function FormTextarea({ title, hideIfEmpty = false, isRequired = false, .