Skip to content

feat(fuselage-forms): Create Package - Form utility wrappers for a11y compliance #1670

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

Merged
merged 39 commits into from
Jul 20, 2025

Conversation

gabriellsh
Copy link
Member

@gabriellsh gabriellsh commented Jun 10, 2025

Proposed changes (including videos or screenshots)

Create the new package fuselage-forms.

This package contains utility wrappers to facilitate implementing forms with proper a11y compliance.

The components in this package are wrapped@rocket.chat/fuselage components that handle most (if not all) a11y necessities of forms. It does so by leveraging react contexts, allowing Labels and Descriptors to "self-register", and Inputs inform the Field of what type they are. Unique ID's are generated for each field, and the labelling strategy varies depending on the rendered input.

In summary, for most cases, it should only be needed to change the import of Field and Input components from @rocket.chat/fuselage to @rocket.chat/fuselage-forms. Then you just need to remove any manual IDs and references to them, such as removing aria-labelledby, htmlFor, id, etc.

Issue(s)

ARCH-1657

Further comments

Copy link

changeset-bot bot commented Jun 10, 2025

🦋 Changeset detected

Latest commit: ee017c5

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

This PR includes changesets to release 1 package
Name Type
@rocket.chat/fuselage-forms Minor

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

@gabriellsh gabriellsh changed the title feat(fuselage): Automatically handle form fields labels feat(fuselage-forms): Create Package - Form utility wrappers for a11y compliance Jun 17, 2025
@gabriellsh
Copy link
Member Author

There's a build error hapenning right now due to a missing dependency on root. This was not caused by this PR, so I'll open it for review.

@gabriellsh gabriellsh marked this pull request as ready for review June 17, 2025 23:00
tassoevan
tassoevan previously approved these changes Jul 18, 2025
@tassoevan tassoevan merged commit bbc28d1 into main Jul 20, 2025
6 checks passed
@tassoevan tassoevan deleted the feat/autoLabels branch July 20, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants