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

New FieldGroup Component #1658

Open
scurker opened this issue Sep 3, 2024 · 0 comments
Open

New FieldGroup Component #1658

scurker opened this issue Sep 3, 2024 · 0 comments
Labels
rfc An issue proposing a new significant change
Milestone

Comments

@scurker
Copy link
Member

scurker commented Sep 3, 2024

FieldGroup is a new grouping component that wraps a related set of input controls and includes a group label with an optional description and error state. This is an unstyled component.

Implementation

type FieldGroupProps = {
  label: ContentNode;
  children: React.ReactNode;
  description?: ContentNode;
  error?: ContentNode;
} & React.HTMLAttributes<HTMLDivElement>

The grouping element should be aria-labelledby and aria-describedby its respective label and/or description (when it's present). This should function and be displayed similarly to how other input controls (TextField, Combobox, Select, etc) handle labels, descriptions, and error display.

Any child content should be displayed inside of the wrapping element.

@scurker scurker added the rfc An issue proposing a new significant change label Sep 3, 2024
@scurker scurker added this to the Future milestone Sep 10, 2024
@scurker scurker modified the milestones: Future, Q4 2024 Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfc An issue proposing a new significant change
Projects
None yet
Development

No branches or pull requests

1 participant