fix: aria controls toggled fields#5938
Conversation
✅ Deploy Preview for partners-bloom-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-angelopolis ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-public-seeds ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for partners-bloom-msq2 canceled.
|
✅ Deploy Preview for bloom-exygy-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Updates Bloom application forms to improve accessibility of conditional UI sections (via aria-controls, aria-expanded, and helper text associations) and bumps @bloom-housing/ui-components to a newer patch release across workspaces.
Changes:
- Bump
@bloom-housing/ui-componentsfrom13.0.3to13.0.6(and updateyarn.lock). - Add ARIA relationships for conditionally revealed address/phone sections in application forms.
- Associate DOB helper text with the DOB field via an
ariaDescribedBy/idpair.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates lock entry for @bloom-housing/ui-components@13.0.6. |
| sites/public/src/pages/applications/household/member.tsx | Adds aria-controls hooks for conditional household member address sections. |
| sites/public/src/pages/applications/contact/name.tsx | Connects DOB helper text to the DOB input via ariaDescribedBy. |
| sites/public/src/pages/applications/contact/alternate-contact-type.tsx | Adds aria-controls and wraps the “Other” detail field container. |
| sites/public/src/pages/applications/contact/address.tsx | Adds ARIA attributes for conditional phone/mailing/work-address sections. |
| sites/public/package.json | Bumps @bloom-housing/ui-components dependency version. |
| sites/partners/package.json | Bumps @bloom-housing/ui-components dependency version. |
| shared-helpers/package.json | Bumps @bloom-housing/ui-components dependency version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
✅ Deploy Preview for partners-bloom-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-angelopolis ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-public-seeds ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-exygy-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
625db81 to
f45582f
Compare
This PR addresses parts of related issues like #2240 #2241
Description
This targets our public application form, but in general: form fields that, when selected, show additional fields (like "I have a second phone number" or indicating you work in the county) need to have aria-controls set to the ID of the section that will be toggled on, and the ID must always be in the DOM. If it's a checkbox, it should also have aria-expanded. Voiceover is not consistent about this with testing, but JAWS relies on this more.
How Can This Be Tested/Reviewed?
Recommend reviewing with the hide whitespace toggle on - these announcements are not getting read in Voiceover which I believe is expected, but this is best practice afaik!
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-controls#:~:text=Explore%20now-,Description,of%20the%20element%20it%20controls.
Author Checklist:
yarn generate:clientand/or created a migration when requiredReview Process: