Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[FormField] Support errorIcon and errorPrefix props for WCAG 1.4.1 compliance

Open
#7,211 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
tailwindcss, typescript

Research direction

The work is on UFormField, where the error message is rendered; find that render path first and confirm how it is currently styled. Before coding, check with maintainers whether errorIcon should accept a string, a slot, or both, since the issue leaves this open. Done when both props are optional, render before the error text, and leave the default output unchanged for existing users.

Written by the indexing model from the issue text.

Description

triage
Package

v4.x

Description

When validating form fields using UFormField, error states are currently indicated visually using color (red text/border by default). Under WCAG 2.2 Success Criterion 1.4.1 (Use of Color - Level A), color must not be the sole visual means of communicating an error or state change.

To comply with accessibility standards, form error messages need non-color visual indicators such as an explicit text prefix (e.g., Error: or Required:) or a visual error icon alongside the error message text.


Proposal

Adding two optional props to UFormField:

  1. errorPrefix?: string
  • Prepends a text indicator before the error string (e.g., "Error", "Required").
  • Defaults to undefined to ensure zero breaking changes for existing users.
  • Rendered alongside the error text (e.g., Error: Please enter a valid email).
  1. errorIcon?: string | slot
  • Displays an icon before the error message (e.g., i-heroicons-exclamation-circle).
  • Defaults to undefined to ensure zero breaking changes for existing users.

Additional context
Dominant language
TypeScript
Stars
7k
Forks
1.1k
Avg merge
1d 17h
Merged PRs (30d)
170

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nuxt/ui

All issues in nuxt/ui

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.