본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)75k · #2859

form-validation

하는 일

이 스킬은 오류 메시지가 알맞은 필드에 연결되도록 양식 검증을 확인합니다. 필수 항목이나 체크 항목이 있는 양식을 만드는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓스크린 리더 사용자가 찾을 수 없는 오류가 양식에 표시될 때.
  • ✓필수 필드가 보조 도구에 표시되어 있지 않을 때.
  • ✓오류가 빨간 테두리만 보여 주고 메시지가 없을 때.

스킬 링크

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/form-validation/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/form-validation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“스크린 리더 사용자를 위해 양식의 오류 메시지를 분명하게 만들어 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 오류 텍스트가 각 필드에 연결되어 있고 잘못된 상태가 표시되어 있는지 확인합니다. 인라인 메시지, 필수 표시, 묶은 선택지를 위한 fieldset을 제안합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Validate forms accessibly

Inaccessible form validation leaves screen reader users unable to understand what went wrong and how to fix it, causing frustration and form abandonment.

Quick Reference

  • Associate error messages with fields using aria-describedby
  • Use aria-invalid to indicate validation state
  • Mark required fields programmatically with required or aria-required
  • Provide inline error messages near the field
  • Don't rely solely on color to indicate errors
  • Keep help text and error text linked to the field throughout validation

Check

Verify forms have client-side validation with accessible error messages linked to form fields via aria-describedby. Do not flag React forms just because they omit method or action when onSubmit clearly handles submission client-side. Confirm required fields are exposed programmatically and grouped controls use fieldset and legend.

Fix

Implement validation with clear error messages, aria-invalid states, and aria-describedby references to error text. For client-handled forms, improve validation semantics without forcing server-post patterns that the component is not using. Add required or aria-required where appropriate and use <fieldset> with <legend> for grouped choices.

Explain

Explain how accessible form validation improves user experience and ensures all users can understand and correct errors.

Code Review

Review templates, server-rendered HTML, and shared components that output markup related to Validate forms accessibly. Flag exact elements, attributes, and routes where the rendered HTML violates the rule. Check that help text and error text are both included in aria-describedby and that required state is exposed in markup, not only in visual styling.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/html/form-validation

자주 묻는 질문

aria-describedby는 무엇을 하나요?

필드를 오류나 도움말 텍스트에 연결해, 스크린 리더가 메시지와 필드를 함께 읽게 합니다.

오류를 색으로만 보여 줘도 되나요?

아니요. 색만으로 오류를 나타내지 말라고 이 스킬은 말합니다.

React 양식도 같은 방식으로 보나요?

이 스킬은 React 양식이 코드로 제출을 처리한다면, method나 action이 없다는 이유만으로 문제로 보지 않는다고 말합니다.

상세 정보

작성자의 원본 설명

Use when reviewing templates, rendered HTML, or shared components related to Validate forms accessibly. Validate the final browser-facing markup, not just the source framework abstraction. Distinguish between browser-posted forms and client-handled React forms so you do not over-report missing `method` or `action` as accessibility defects.

repo: thedaviddias/Front-End-Checklist

인기도

GitHub 스타
75k
순위
#2859
라이선스
MIT
업데이트
2026. 10. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬