Skip to content
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

feat(FormField): set aria-describedby and aria-invalid attributes #3123

Merged
merged 7 commits into from
Jan 20, 2025

Conversation

romhml
Copy link
Collaborator

@romhml romhml commented Jan 17, 2025

πŸ”— Linked issue

Resolves #3111

❓ 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

Adds accessibility attributes on FormField and relevant inputs. This PR also adds tests for the label for=... input binding and fixes said binding on the Select component.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@romhml romhml requested a review from benjamincanac January 17, 2025 07:56
Copy link

cloudflare-workers-and-pages bot commented Jan 17, 2025

Deploying ui3 with Β Cloudflare Pages Β Cloudflare Pages

Latest commit: 96c772f
Status:Β βœ…Β  Deploy successful!
Preview URL: https://e0acca25.ui-6q2.pages.dev
Branch Preview URL: https://feat-form-a11y.ui-6q2.pages.dev

View logs

@benjamincanac
Copy link
Member

@romhml It seems the tests don't pass on Vue because ids look like v-0 instead of v-0-0. We might need to get the attributes only by name (aria-describedby) without the value to support both versions 😬

@romhml
Copy link
Collaborator Author

romhml commented Jan 17, 2025

Thanks @benjamincanac I'll look into it!

@romhml
Copy link
Collaborator Author

romhml commented Jan 17, 2025

@benjamincanac it should be good to go!

Copy link

pkg-pr-new bot commented Jan 17, 2025

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

commit: 96c772f

@benjamincanac benjamincanac changed the title feat(FormField): set aria-describedby and aria-invalid attributes feat(FormField): set aria-describedby and aria-invalid attributes Jan 20, 2025
@benjamincanac benjamincanac merged commit b95b913 into v3 Jan 20, 2025
3 checks passed
@benjamincanac benjamincanac deleted the feat/form-a11y branch January 20, 2025 10:46
@benjamincanac benjamincanac added the v3 #1289 label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 #1289
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add a11y to form stuff
2 participants