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

Remove live region from FormControl validation #4711

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

TylerJDev
Copy link
Contributor

@TylerJDev TylerJDev commented Jul 1, 2024

Unblocks: https://github.com/github/accessibility-audits/issues/6883, https://github.com/github/accessibility-audits/issues/6881, https://github.com/github/accessibility-audits/issues/5728

We've received feedback from the Accessibility team that it may be less than ideal for the FormControl component to have a live region for validation, as the aria-describedby should suffice in most scenarios. Consumers of this component may still provide a live region, but it will no longer be included by default.

Changelog

Removed

  • Removes aria-live from FormControl.Validation

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Copy link

changeset-bot bot commented Jul 1, 2024

🦋 Changeset detected

Latest commit: 0a1dcb2

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

This PR includes changesets to release 1 package
Name Type
@primer/react 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

Copy link
Contributor

github-actions bot commented Jul 1, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 90.95 KB (-0.03% 🔽)
packages/react/dist/browser.umd.js 91.35 KB (+0.11% 🔺)

@TylerJDev
Copy link
Contributor Author

This removes the live region from FormControl.Validation completely, but I think it might be worth in the future to revisit and see how, or even if we'd want to make this opt-in utilizing @primer/live-region-element. At the very least we can add an example of a custom implementation of a live region + validation if decide this is a pattern that could be used accessibly.

@TylerJDev TylerJDev marked this pull request as ready for review July 1, 2024 19:22
@TylerJDev TylerJDev requested a review from a team as a code owner July 1, 2024 19:22
@TylerJDev TylerJDev requested a review from camertron July 1, 2024 19:22
@TylerJDev TylerJDev added this pull request to the merge queue Jul 3, 2024
Merged via the queue into main with commit 199e384 Jul 3, 2024
35 checks passed
@TylerJDev TylerJDev deleted the tylerjdev/remove-aria-live-from-form-control branch July 3, 2024 17:32
@primer primer bot mentioned this pull request Jul 3, 2024
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.

2 participants