Skip to content

fix(clerk-js): Only apply id to FormFeedback when the type is error - #4552

Merged
alexcarpenter merged 5 commits into
mainfrom
alexcarpenter/fix-form-feedback-multiple-ids
Nov 19, 2024
Merged

fix(clerk-js): Only apply id to FormFeedback when the type is error#4552
alexcarpenter merged 5 commits into
mainfrom
alexcarpenter/fix-form-feedback-multiple-ids

Conversation

@alexcarpenter

@alexcarpenter alexcarpenter commented Nov 13, 2024

Copy link
Copy Markdown
Member

Description

Fixes an issue where multiple elements in the dom include the same id attribute which leads to invalid markup and causes a11y issues.

multiples-errors

Since we only apply aria-describedby on the input element when there is an errorMessageId, we only apply the id to the FormFeedback when its of type error

After:

after

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@changeset-bot

changeset-bot Bot commented Nov 13, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 82ae553

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@alexcarpenter
alexcarpenter marked this pull request as draft November 13, 2024 20:17

@brkalow brkalow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👏

@alexcarpenter
alexcarpenter marked this pull request as ready for review November 14, 2024 19:02
@alexcarpenter
alexcarpenter merged commit 03482f3 into main Nov 19, 2024
@alexcarpenter
alexcarpenter deleted the alexcarpenter/fix-form-feedback-multiple-ids branch November 19, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants