fix(ux-audit): CRITICAL + HIGH fixes — a11y, reduced-motion, forms, keyboard nav
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
This commit is contained in:
@@ -157,7 +157,8 @@ export function EditorialNoteMenu({
|
||||
<DropdownMenuTrigger asChild onClick={e => e.stopPropagation()}>
|
||||
<button
|
||||
ref={menuTriggerRef}
|
||||
className="opacity-0 group-hover:opacity-100 transition-opacity p-1.5 rounded-md hover:bg-muted/60 text-muted-foreground hover:text-foreground"
|
||||
className="opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-opacity p-1.5 rounded-md hover:bg-muted/60 text-muted-foreground hover:text-foreground cursor-pointer"
|
||||
aria-label={t('notes.moreOptions') || 'Options'}
|
||||
>
|
||||
<MoreHorizontal size={15} />
|
||||
</button>
|
||||
@@ -396,6 +397,9 @@ export function NotesEditorialView({
|
||||
transition={hydrated ? { delay: 0.05 * index, duration: 0.6 } : { duration: 0 }}
|
||||
className="space-y-4 group cursor-pointer relative pb-8"
|
||||
onClick={() => onOpen(note)}
|
||||
onKeyDown={(e) => { if (e.key === 'Enter') onOpen(note) }}
|
||||
tabIndex={0}
|
||||
role="button"
|
||||
>
|
||||
{/* Date / breadcrumb — isolated bidi so Latin notebook name + Jalali date don’t reorder wrongly */}
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user