Skip to content

fix(FormField): resolve minor accessibility and rendering issues #4515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ThiloHettmer
Copy link
Contributor

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR fixes two minor issues. First one is that in the Formfield component the help text has no id, and the Input component references it through useFormfield by its aria-describedby. Second issue is that the aria-describedby is added even if no help text is provided to the Formfield component.

Copy link

pkg-pr-new bot commented Jul 16, 2025

npm i https://pkg.pr.new/@nuxt/ui@4515

commit: 50d348d

Copy link
Member

@romhml romhml left a comment

Choose a reason for hiding this comment

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

Thanks @ThiloHettmer :)

Could you add a few test cases to lock these in? https://github.com/nuxt/ui/blob/v3/test/components/FormField.spec.ts#L108

@ThiloHettmer
Copy link
Contributor Author

Hi @romhml :) I have added 2 tests

@benjamincanac benjamincanac merged commit c64c4cd into nuxt:v3 Jul 16, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants