From 2c9cb547e7ebe46f6ab66afaf106c6776f09efd0 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Thu, 29 Jan 2026 01:48:58 +0000
Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Improve=20Contact=20f?=
=?UTF-8?q?orm=20accessibility?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
💡 What: Added ARIA roles to form status messages and hid decorative icons.
🎯 Why: Screen readers were missing dynamic success/error messages on form submission.
♿ Accessibility:
- Added `role="alert"` and `aria-live="polite"` to success, error, and rate-limit messages.
- Added `aria-hidden="true"` to decorative icons in the contact info section.
Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
---
.jules/palette.md | 3 +++
src/pages/Contact.tsx | 9 ++++++++-
src/pages/__tests__/Contact.test.tsx | 30 ++++++++++++++++++++++++++++
3 files changed, 41 insertions(+), 1 deletion(-)
create mode 100644 .jules/palette.md
diff --git a/.jules/palette.md b/.jules/palette.md
new file mode 100644
index 0000000..e9e6383
--- /dev/null
+++ b/.jules/palette.md
@@ -0,0 +1,3 @@
+## 2025-02-18 - Missing Alerts for Dynamic Status
+**Learning:** The application uses `framer-motion` for dynamic feedback messages but consistently lacks `role="alert"` and `aria-live` attributes, causing screen readers to miss critical status updates.
+**Action:** When auditing forms, check all `motion.div/p` elements used for feedback and add `role="alert"` and `aria-live="polite"` (or "assertive" for errors).
diff --git a/src/pages/Contact.tsx b/src/pages/Contact.tsx
index 708d7c8..79c91c4 100644
--- a/src/pages/Contact.tsx
+++ b/src/pages/Contact.tsx
@@ -210,6 +210,8 @@ export function Contact() {
className={styles.success}
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
+ role="alert"
+ aria-live="polite"
>
{t.contact.form.success}
@@ -220,6 +222,8 @@ export function Contact() {
className={styles.error}
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
+ role="alert"
+ aria-live="polite"
>
{t.contact.form.error}
@@ -230,6 +234,8 @@ export function Contact() {
className={styles.error}
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
+ role="alert"
+ aria-live="polite"
>
{t.contact.form.rateLimit}
@@ -254,6 +260,7 @@ export function Contact() {
fill="none"
stroke="currentColor"
strokeWidth="2"
+ aria-hidden="true"
>