UI: Mark Autocomplete, Field, and Fieldset as recommended - #80636
Conversation
|
Size Change: 0 B Total Size: 7.75 MB |
bfc10ed to
62ba337
Compare
Autocomplete from @wordpress/ui as recommendedAutocomplete as recommended
Autocomplete as recommended|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Same comment as #81658 re. adding accessible labels. Separately, I'm not sure we should advertise using Finally, is the Storybook manifest missing |
I'll add some broad guidance here for this pass (fefc612), and follow up to point to labeling guidance in each of the primitives, and maybe add
TIL! Fixed. Also removed the
Fixed 👍 |
ciampo
left a comment
There was a problem hiding this comment.
LGTM 🚀
Good to merge once remaining feedback is addressed
| export type AutocompleteInputProps = Omit< | ||
| ComponentProps< typeof _Autocomplete.Input >, | ||
| 'size' | ||
| 'size' | 'type' // The combobox role is only valid on input type="text". |
There was a problem hiding this comment.
Consumers would still be able to use render, eg doing render={ <Input type="url" /> } or render={ <textarea /> }.
Depending on how much we wan to enforce this, we may want to make the render type stricter, and / or force the type to text at runtime
|
Nice. I'll follow up with a few refactoring changes, like #76986 (comment), once this is merged. |
# Conflicts: # packages/eslint-plugin/CHANGELOG.md
What?
Marks
Autocomplete,Field, andFieldsetfrom@wordpress/uias recommended for use in a WordPress environment.Why?
Autocompletehas been reviewed for style consistency, overlays compatibility, and API completeness.FieldandFieldsetare the recommended companions for labeling and grouping form controls, and are often necessary alongsideAutocomplete.BaseControlremains recommended for now. It will eventually be superseded byField, but there is not yet a direct replacement forBaseControl.VisualLabel, which is the majority use case forBaseControl. We'll probably want to add aField.VisualLabelto cover this, since a normalField.Labelcarries semantics and can only be used within aField.Root.How?
Autocomplete,Field, andFieldsetto the@wordpress/uiallow-list in theuse-recommended-componentsESLint rule.componentStatustorecommendedand adds themanifesttag for the@wordpress/uicomponents.Testing Instructions
Autocomplete,Field, andFieldsetshow as recommended in the component status.BaseControlstill shows as recommended.