CodeForPhilly / CodeForPhilly/codeforphilly-ng
Form error ids should derive from useId (hardcoded title-error/slug-error collide across screen + modal)
- Lenguaje dominante
- TypeScript
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 5 d 3 h
- PR fusionados (30 d)
- 9
Descripción
Follow-up from PR #155 (ARIA correctness).
The form error wiring in that PR gives every error `
` an id and points the control at it with `aria-describedby`. Several of those ids are hardcoded string literals — `title-error`, `slug-error`, and siblings in ProjectEdit, ProjectBuzzNew, TagEditModal, etc. When a screen and a modal that both use one of those ids are mounted at the same time (e.g. ProjectEdit with PostHelpWantedModal open), the ids collide and `aria-describedby` can resolve to the wrong element.
Derive the ids from `useId()` (as SearchBox and TagPicker already do) so each mounted form instance owns unique ids. Consider a tiny helper so the `${id}-error` convention stays in one place.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01RdRwHvDupRLV8GuJpYKzEr
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Start by locating the form error wiring in ProjectEdit, ProjectBuzzNew, TagEditModal, and related components, then compare the existing useId usage in SearchBox and TagPicker. Centralize or consistently derive each error id from the form instance, and verify that simultaneously mounted forms have unique ids and matching aria-describedby references.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- accessibility, frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 72/100