Skip to content

fix(commitments): scroll + focus the edit form on open (a11y)#244

Merged
thierryvm merged 2 commits into
mainfrom
fix/commitments-edit-focus
Jul 24, 2026
Merged

fix(commitments): scroll + focus the edit form on open (a11y)#244
thierryvm merged 2 commits into
mainfrom
fix/commitments-edit-focus

Conversation

@thierryvm

Copy link
Copy Markdown
Owner

Motivation

Follow-up du dashboard-ux-auditor sur #240 (P1). Cliquer le crayon d'un engagement en bas d'une longue liste ouvrait le formulaire d'édition tout en haut de la page — hors écran, sans aucun changement visible pour un utilisateur sighted, et sans repère pour clavier/lecteur d'écran (pattern ARIA APG Disclosure : déplacer le focus vers le contenu révélé).

Fix

useEffect sur formMode/editingId : focus du champ libellé (preventScroll) + scrollIntoView smooth du formulaire. Bonus P3 : opacity disabled du stepper 40 → 50 (cohérence token).

Evidence

  • typecheck ✅ · 27 tests commitments (dont un nouveau : le crayon déplace le focus dans le form)
  • scrollIntoView gardé (?.) pour jsdom.

🤖 Generated with Claude Code

…rd-ux-auditor P1)

Clicking the pencil on a row far down the list opened the edit/create form at the
TOP of the page — off-screen, with no change for a sighted user and no cue for
keyboard/screen-reader users. An effect keyed on formMode/editingId now focuses
the label field (preventScroll) and smooth-scrolls the form into view. Also
aligns the stepper's disabled opacity 40 → 50 with the design-system token (P3).
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ankora Ready Ready Preview, Comment Jul 24, 2026 3:49pm

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @thierryvm, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 65c8c4955f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/app/[locale]/app/commitments/CommitmentsClient.tsx Outdated
…roll (Codex review)

Users with prefers-reduced-motion: reduce get an instant jump instead of a smooth
scroll when the form opens (WCAG 2.3.3 Animation from Interactions).
@thierryvm

Copy link
Copy Markdown
Owner Author

@chatgpt-codex Bon point — corrigé : le scroll respecte désormais prefers-reduced-motion (behavior: 'auto' si reduce, WCAG 2.3.3).

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@thierryvm
thierryvm merged commit 61dd36d into main Jul 24, 2026
9 checks passed
@thierryvm
thierryvm deleted the fix/commitments-edit-focus branch July 24, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:review-needed Ready for review type:fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant