From 0153a7ca00c9cacc8978657d5fa54c426847a269 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Mar 2026 15:51:03 +0000 Subject: [PATCH 1/2] fix: code quality and accessibility improvements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Accessibility (a11y): - Add aria-label to all icon-only buttons whose visible text is hidden on mobile (Restore/Edit in ArchiveItem, Restore/Delete/Edit in ArchiveEditDialog header, Edit/Delete per-task buttons in ArchiveEditDialog table, Edit/Delete in ProjectManagement) - Replace focus:outline-none with focus-visible:outline-none + focus-visible ring on Radix TabsTrigger elements in ArchiveItem — browser focus rings were completely removed for all users, now removed only for pointer clicks while remaining visible for keyboard navigation - Connect Label/Textarea pairs via htmlFor+id in ArchiveEditDialog (day notes) and TaskEditInArchiveDialog (task description) so screen readers announce the field label when the textarea receives focus Code Quality — theme variable adoption: - Replace text-gray-900 with text-foreground (headings in ArchiveItem, ArchiveEditDialog, ProjectManagement) - Replace text-gray-600/500/400 with text-muted-foreground (secondary text in all five components) - Replace text-gray-700 with text-muted-foreground on TabsTrigger active indicator classes in ArchiveItem - Replace bg-gray-50 dark:bg-gray-800 with bg-muted in ArchiveItem note/ summary panels; update print:border-gray-300 to print:border-border; update prose-p:text-gray-700 prose modifiers to prose-p:text-muted-foreground - Replace data-[state=active]:border-blue-600 with data-[state=active]:border- primary on tab triggers in ArchiveItem - Replace text-red-*/bg-red-*/border-red-* with text-destructive/ bg-destructive/5/border-destructive/20 in ArchiveEditDialog delete confirmation card and ExportDialog import error alert - Switch icon-only Delete buttons from custom text-red-600 outline to variant="destructive" in ArchiveEditDialog task table and ProjectManagement - Replace required-field asterisk text-red-700 with text-destructive in TaskEditInArchiveDialog Inline style violations: - ArchiveEditDialog: style={{ marginBottom: '1rem' }} → className="mb-4" - ExportDialog: style={{ display: 'none' }} → className="hidden" https://claude.ai/code/session_012AmNjF3Ju9VJwSWybJqBEw --- src/components/ArchiveEditDialog.tsx | 45 ++++++++++++---------- src/components/ArchiveItem.tsx | 34 ++++++++-------- src/components/ExportDialog.tsx | 16 ++++---- src/components/ProjectManagement.tsx | 13 ++++--- src/components/TaskEditInArchiveDialog.tsx | 7 ++-- 5 files changed, 62 insertions(+), 53 deletions(-) diff --git a/src/components/ArchiveEditDialog.tsx b/src/components/ArchiveEditDialog.tsx index 54126ed..9a6837f 100644 --- a/src/components/ArchiveEditDialog.tsx +++ b/src/components/ArchiveEditDialog.tsx @@ -265,6 +265,7 @@ export const ArchiveEditDialog: React.FC = ({ onClick={handleRestoreDay} variant="outline" size="sm" + aria-label="Restore this day" className="text-blue-600 hover:text-blue-700" > @@ -274,6 +275,7 @@ export const ArchiveEditDialog: React.FC = ({ onClick={() => setShowDeleteConfirm(true)} variant="destructive" size="sm" + aria-label="Delete this day" > Delete @@ -282,6 +284,7 @@ export const ArchiveEditDialog: React.FC = ({ onClick={() => setIsEditing(true)} variant="default" size="sm" + aria-label="Edit this day" > Edit @@ -312,7 +315,7 @@ export const ArchiveEditDialog: React.FC = ({ )} - + Summary of Day @@ -355,7 +358,7 @@ export const ArchiveEditDialog: React.FC = ({
- + Edit @@ -363,6 +366,7 @@ export const ArchiveEditDialog: React.FC = ({