Skip to content

UI: Mark Autocomplete, Field, and Fieldset as recommended - #80636

Merged
mirka merged 15 commits into
trunkfrom
mark-autocomplete-recommended
Aug 20, 2026
Merged

UI: Mark Autocomplete, Field, and Fieldset as recommended#80636
mirka merged 15 commits into
trunkfrom
mark-autocomplete-recommended

Conversation

@mirka

@mirka mirka commented Jul 23, 2026

Copy link
Copy Markdown
Member

What?

Marks Autocomplete, Field, and Fieldset from @wordpress/ui as recommended for use in a WordPress environment.

Why?

Autocomplete has been reviewed for style consistency, overlays compatibility, and API completeness. Field and Fieldset are the recommended companions for labeling and grouping form controls, and are often necessary alongside Autocomplete.

BaseControl remains recommended for now. It will eventually be superseded by Field, but there is not yet a direct replacement for BaseControl.VisualLabel, which is the majority use case for BaseControl. We'll probably want to add a Field.VisualLabel to cover this, since a normal Field.Label carries semantics and can only be used within a Field.Root.

How?

  • Adds Autocomplete, Field, and Fieldset to the @wordpress/ui allow-list in the use-recommended-components ESLint rule.
  • Updates the Storybook stories: sets componentStatus to recommended and adds the manifest tag for the @wordpress/ui components.
  • Updates the Storybook manifest snapshot and prop description allowlist for the newly manifest-listed components.

Testing Instructions

  1. Open Storybook and confirm Autocomplete, Field, and Fieldset show as recommended in the component status.
  2. Confirm BaseControl still shows as recommended.

@mirka mirka self-assigned this Jul 23, 2026
@github-actions github-actions Bot added the [Package] UI /packages/ui label Jul 23, 2026
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 7.75 MB

compressed-size-action

@mirka
mirka force-pushed the mark-autocomplete-recommended branch from bfc10ed to 62ba337 Compare July 23, 2026 16:25
@mirka mirka changed the title Mark Autocomplete from @wordpress/ui as recommended UI: Mark Autocomplete as recommended Jul 23, 2026
@mirka mirka added the [Type] Developer Documentation Documentation for developers label Jul 23, 2026
@mirka mirka changed the title UI: Mark Autocomplete as recommended UI: Mark Autocomplete, Field, and Fieldset as recommended Aug 14, 2026
@github-actions github-actions Bot added the [Package] Components /packages/components label Aug 14, 2026
@github-actions github-actions Bot removed the [Package] Components /packages/components label Aug 14, 2026
@github-actions github-actions Bot added the [Package] Components /packages/components label Aug 14, 2026
@mirka
mirka marked this pull request as ready for review August 14, 2026 20:00
@mirka
mirka requested review from a team, ajitbohra and ntwb as code owners August 14, 2026 20:00
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ciampo

ciampo commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Same comment as #81658 re. adding accessible labels.

Separately, I'm not sure we should advertise using type="url" in Autocomplete.Input (and potentially rendering that same compnent as textarea) as it seems that the official aria spec permits combobox on input type="text", while URL inputs and textareas permit only textbox 🤔 Base UI does it, but it may warrant a deeper look.

Finally, is the Storybook manifest missing Fieldset.Legend, Fieldset.Description, and Fieldset.Details ? (and potentially root props too?)

@mirka

mirka commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

Same comment as #81658 re. adding accessible labels.

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 aria-labels for the general examples. (reference)

Separately, I'm not sure we should advertise using type="url" in Autocomplete.Input (and potentially rendering that same compnent as textarea) as it seems that the official aria spec permits combobox on input type="text", while URL inputs and textareas permit only textbox 🤔 Base UI does it, but it may warrant a deeper look.

TIL! Fixed. Also removed the type prop on the Input subcomponents for both combobox families.

Finally, is the Storybook manifest missing Fieldset.Legend, Fieldset.Description, and Fieldset.Details ? (and potentially root props too?)

Fixed 👍

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Comment thread packages/ui/CHANGELOG.md Outdated
Comment thread packages/eslint-plugin/rules/use-recommended-components.js
@Mamaduka

Copy link
Copy Markdown
Member

Nice. I'll follow up with a few refactoring changes, like #76986 (comment), once this is merged.

mirka added 2 commits August 21, 2026 00:48
@mirka
mirka enabled auto-merge (squash) August 20, 2026 15:57
@mirka
mirka merged commit da0bf8d into trunk Aug 20, 2026
60 checks passed
@mirka
mirka deleted the mark-autocomplete-recommended branch August 20, 2026 16:27
@github-actions github-actions Bot added this to the Gutenberg 23.9 milestone Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Components /packages/components [Package] UI /packages/ui [Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants