From 56406c6da05b7779db5df761e2c795e1062a598f Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 21:49:19 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=95=B8=EF=B8=8F=20Spider:=20Add=20ARIA=20?= =?UTF-8?q?roles=20to=20AnnouncementPopup=20modal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added `role="dialog"`, `aria-modal="true"`, and `aria-labelledby` to the `AnnouncementPopup` modal. Also added a matching `id` to the title `

`. This ensures proper semantic structure and accessibility. Co-authored-by: kourdroid <36898160+kourdroid@users.noreply.github.com> --- .jules/spider.md | 3 +++ src/components/AnnouncementPopup/index.tsx | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.jules/spider.md b/.jules/spider.md index 572ac48..19485bc 100644 --- a/.jules/spider.md +++ b/.jules/spider.md @@ -10,3 +10,6 @@ ## 2024-05-19 - Typechecking JSON-LD Date Properties **Learning:** When passing potentially null date fields (like `publishedAt`, `updatedAt`) from Payload CMS to jsonLd generator functions, using the fields directly can cause strict TypeScript compilation failures since the schemas explicitly expect `string | undefined` and not `null`. **Action:** Always use the logical OR operator with `undefined` (e.g., `datePublished: post.publishedAt || undefined`) when passing date properties to JSON-LD generator functions to satisfy strict type requirements and prevent build regressions. +## 2024-06-25 - Modal Semantic Structure +**Learning:** Found instances where custom modals (like AnnouncementPopup) lacked proper ARIA roles (`role="dialog"`) and `aria-modal="true"`. This prevents screen readers from understanding that a modal has opened and traps focus appropriately, severely impacting accessibility and semantic structure which search engines value for usability. +**Action:** Always add `role="dialog"` and `aria-modal="true"` to the root container of custom modal dialogs. Additionally, ensure they have a descriptive `aria-label` or `aria-labelledby` referencing their title. diff --git a/src/components/AnnouncementPopup/index.tsx b/src/components/AnnouncementPopup/index.tsx index d7d89db..24a8d33 100644 --- a/src/components/AnnouncementPopup/index.tsx +++ b/src/components/AnnouncementPopup/index.tsx @@ -109,7 +109,11 @@ export const AnnouncementPopup: React.FC = ({ announceme /> {/* Modal Content */} + {/* SEO: Add role="dialog", aria-modal="true", and aria-labelledby for proper accessibility and semantic structure */} = ({ announceme {/* Right Side: Content */}
{/* Title */} -

+

{title}