Skip to content

Conversation

@aresnik11
Copy link
Contributor

@aresnik11 aresnik11 commented Nov 14, 2025

Overview

Adds aria-controls to checkboxes that control children.

PR Checklist

  • Related to designs:
  • Related to JIRA ticket: GMT-1456
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

Testing Instructions

  1. Go to ConnectedForm
  2. See that Frontend Technologies checkbox has aria-controls for all its children and grandchildren
  3. See that React checkbox has aria-controls for all its children
  4. See that Next.js checkbox does not include aria-controls
  5. Check it with VO
  6. Go to GridForm
  7. Repeat 2-5
  8. Finish and do a celebratory dance

PR Links and Envs

Repository PR Link
Monolith Monolith PR
Mono Mono PR

@nx-cloud
Copy link

nx-cloud bot commented Nov 14, 2025

View your CI Pipeline Execution ↗ for commit 26dfebf


☁️ Nx Cloud last updated this comment at 2025-11-14 19:15:35 UTC

@aresnik11 aresnik11 changed the title Ajr nested checkbox aria controls feat(ConnectedForm, GridForm): Add aria-controls to nested checkboxes Nov 17, 2025
@aresnik11 aresnik11 marked this pull request as ready for review November 17, 2025 15:43
@aresnik11 aresnik11 requested a review from a team as a code owner November 17, 2025 15:43
@github-actions
Copy link
Contributor

@codecademydev
Copy link
Collaborator

📬 Published Alpha Packages:

@codecademy/[email protected]
@codecademy/[email protected]

@aresnik11 aresnik11 requested a review from sh0ji November 17, 2025 16:01
Copy link
Contributor

@LinKCoding LinKCoding left a comment

Choose a reason for hiding this comment

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

Left a Q for my own edification.
Otherwise, QA'd and it looks great, nice addition of tests too!

id={checkboxId}
label={option.label}
multiline={option.multiline}
name={checkboxId}
Copy link
Contributor

Choose a reason for hiding this comment

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

very much a nit: I don't think this will really affect anyone, but I do wonder if name can be set as the incoming name from the parameters.

That seems to be more like the HTML pattern. With react forms, this info will be sent in a different format, so this is more trying to understand a topic :) Gimme your thoughts please, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah the html pattern seems to like them grouped with the same name since thats how it gets submitted, but thats not the case with react hook form. in rhf it doesnt seem to be used at all so not sure it matters? this example doesn't even include name so maybe it can be omitted? https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/examples/checkbox-mixed/
@sh0ji do you have thoughts?

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.

4 participants