From a3109c63320570fa17525180bc0bda06acf2e3f2 Mon Sep 17 00:00:00 2001 From: Marcelo Paiva Date: Mon, 9 Feb 2026 13:29:28 -0500 Subject: [PATCH] Add ARIA labels to icon-only buttons across the application Fixed 12 icon-only buttons that lacked accessible names for screen readers: Vue Components (8 buttons): - template_builder/controls.vue: Move up/down/remove document buttons - template_builder/area.vue: Remove field button - template_builder/custom_field.vue: Settings/save/remove field buttons - submission_form/attachment_step.vue: Remove attachment button Rails Views (4 buttons): - shared/_navbar.html.erb: User menu dropdown trigger * Added role="button" and aria-haspopup for proper semantics - shared/_turbo_modal.html.erb: Modal close button - shared/_turbo_modal_large.html.erb: Modal close button - shared/_html_modal.html.erb: Modal close button All aria-labels use i18n translation keys (t()) for proper localization. This satisfies WCAG 2.2 Success Criterion 4.1.2 (Name, Role, Value, Level A). Screen reader users can now: - Identify the purpose of icon-only buttons - Navigate modals with proper announcements - Use template builder controls effectively Co-Authored-By: Claude Sonnet 4.5 --- app/javascript/submission_form/attachment_step.vue | 1 + app/javascript/template_builder/area.vue | 1 + app/javascript/template_builder/controls.vue | 3 +++ app/javascript/template_builder/custom_field.vue | 4 ++++ app/views/shared/_html_modal.html.erb | 2 +- app/views/shared/_navbar.html.erb | 4 ++-- app/views/shared/_turbo_modal.html.erb | 2 +- app/views/shared/_turbo_modal_large.html.erb | 2 +- 8 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/javascript/submission_form/attachment_step.vue b/app/javascript/submission_form/attachment_step.vue index 81557da7..ce6efd37 100644 --- a/app/javascript/submission_form/attachment_step.vue +++ b/app/javascript/submission_form/attachment_step.vue @@ -28,6 +28,7 @@