Skip to content

Fix missing required in Select (& HiddenSelect)#5026

Closed
Gregoor wants to merge 1 commit into
adobe:mainfrom
Gregoor:fix/Select-missing-required
Closed

Fix missing required in Select (& HiddenSelect)#5026
Gregoor wants to merge 1 commit into
adobe:mainfrom
Gregoor:fix/Select-missing-required

Conversation

@Gregoor
Copy link
Copy Markdown

@Gregoor Gregoor commented Sep 5, 2023

Hi,

I noticed the lack of a required prop on the Select comps, but I need it to block form submission. Hope it's alright to jump straight to PR without a prior issue, it seemed pretty clear to me that this will be needed.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

@devongovett
Copy link
Copy Markdown
Member

At the moment, none of our form components block native form submission. They use aria-required instead. So this would be a bigger change. I had started the work for native form validation support over in #4640.

@Gregoor
Copy link
Copy Markdown
Author

Gregoor commented Sep 6, 2023

Ah! I've been using react-arias <RadioGroup> in another place where disabled was working, so I guess my expectations got mixed up.

Would a PR adding it only to useSelect be more acceptable then?

@devongovett
Copy link
Copy Markdown
Member

Yeah eventually, but it depends on the form validation stuff I linked to to avoid the browser's native validation UI. I am currently working on that, so I'll close this one out for now.

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