From e72ca26f97dd2f27dd790ea1b1f4bdf9813a9ac2 Mon Sep 17 00:00:00 2001 From: Antigravity Date: Sat, 4 Jul 2026 21:37:56 +0000 Subject: [PATCH] =?UTF-8?q?fix(ux-audit):=20CRITICAL=20+=20HIGH=20fixes=20?= =?UTF-8?q?=E2=80=94=20a11y,=20reduced-motion,=20forms,=20keyboard=20nav?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Global (globals.css): - prefers-reduced-motion: désactive toutes les animations/transitions - focus-visible:ring global sur tous les éléments interactifs Search modal: - role="dialog" + aria-modal="true" + aria-label - onClick backdrop ferme la modale Insights peek: - DOMPurify.sanitize() sur dangerouslySetInnerHTML (XSS fix) Login form: - autoComplete="email" / "current-password" - htmlFor sur tous les labels Register form: - autoComplete="name" / "email" / "new-password" - htmlFor sur tous les labels GridCard (notes-list-views): - Actions visibles sur mobile (opacity-100 sm:opacity-0) - aria-sort sur colonne triable - role="button" + tabIndex + onKeyDown sur lignes table Editorial view: - role="button" + tabIndex + onKeyDown sur articles - Menu trigger aria-label + visible mobile Toolbar: - aria-label voice i18n --- memento-note/app/(main)/insights/page.tsx | 3 ++- memento-note/app/globals.css | 19 +++++++++++++++++++ memento-note/components/login-form.tsx | 6 ++++-- .../note-editor/note-editor-toolbar.tsx | 2 +- .../components/notes-editorial-view.tsx | 6 +++++- memento-note/components/notes-list-views.tsx | 8 ++++++-- memento-note/components/register-form.tsx | 12 ++++++++---- memento-note/components/search-modal.tsx | 8 +++++++- 8 files changed, 52 insertions(+), 12 deletions(-) diff --git a/memento-note/app/(main)/insights/page.tsx b/memento-note/app/(main)/insights/page.tsx index 6c2ebeb..db68069 100644 --- a/memento-note/app/(main)/insights/page.tsx +++ b/memento-note/app/(main)/insights/page.tsx @@ -28,6 +28,7 @@ import Link from 'next/link' import { getNoteById } from '@/app/actions/notes' import type { Note as NoteFull } from '@/lib/types' import { X, Maximize2 } from 'lucide-react' +import DOMPurify from 'dompurify' const NetworkGraph = dynamic( () => import('@/components/network-graph').then(m => ({ default: m.NetworkGraph })), @@ -934,7 +935,7 @@ export default function InsightsPage() {
) : (

diff --git a/memento-note/app/globals.css b/memento-note/app/globals.css index 981d8ff..826483d 100644 --- a/memento-note/app/globals.css +++ b/memento-note/app/globals.css @@ -6,6 +6,25 @@ @custom-variant dark (&:is(.dark *)); +/* ── Global UX fixes (UI/UX Pro Max audit) ────────────────────────────── */ + +/* CRITICAL: prefers-reduced-motion — désactive toutes les animations */ +@media (prefers-reduced-motion: reduce) { + *, *::before, *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + scroll-behavior: auto !important; + } +} + +/* CRITICAL: focus-visible ring global sur tous les éléments interactifs */ +:focus-visible { + outline: 2px solid var(--color-brand-accent); + outline-offset: 2px; + border-radius: 4px; +} + /* Custom breakpoints for desktop design (matching code.html reference) */ @theme { /* Desktop breakpoints: 1024px (min), 1440px (large), 1920px (ultra-wide) */ diff --git a/memento-note/components/login-form.tsx b/memento-note/components/login-form.tsx index a389d74..4c835f6 100644 --- a/memento-note/components/login-form.tsx +++ b/memento-note/components/login-form.tsx @@ -86,7 +86,7 @@ export function LoginForm({
-