Skip to content

fix(combobox): align slotted field label with standalone label#6047

Open
aramos-adobe wants to merge 5 commits intonikkimk/form-field-mixinfrom
aziz/form-field-mixin-bug-fix
Open

fix(combobox): align slotted field label with standalone label#6047
aramos-adobe wants to merge 5 commits intonikkimk/form-field-mixinfrom
aziz/form-field-mixin-bug-fix

Conversation

@aramos-adobe
Copy link
Contributor

@aramos-adobe aramos-adobe commented Feb 24, 2026

Description

Aligns the combobox slotted field label with standalone (typography, colors, sizes) and fixes picker button placement and disabled high-contrast styling.

This is also aims to align grid layout of the combobox referenced in SWC-1316

Motivation and context

The combobox uses FieldLabelMixin, which renders the label in shadow DOM. The slotted label’s CSS did not match the standalone <sp-field-label> component, and the picker button could misalign when a label was present. Disabled state in forced-colors also needed to use GrayText for the picker button.

Related issue(s)

  • fixes [SWC-1320]

Screenshots (if appropriate)


Still left TO-DO

  • Fix side alignment of the label and picker button
  • Remove border on .spectrum-PickerButton--quiet disabled state

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Slotted label vs standalone: Combobox default story and "With standalone field label" story — slotted label (e.g. <span slot="field-label">) matches standalone <sp-field-label> in typography, spacing, and colors.

    1. Open Storybook → Combobox → Default and "With standalone field label".
    2. Compare label appearance; change size (s/m/l/xl), disabled, required.
    3. Expect slotted and standalone labels to look the same.
  • Picker button alignment: Combobox with a slotted label — picker button stays aligned with the input row.

    1. Open Combobox → Default (or any story with a field label).
    2. Check that the chevron/button is vertically aligned with the input, not shifted.
    3. Expect no misalignment.
  • Forced-colors disabled: Disabled combobox in high-contrast mode — label and picker button use GrayText.

    1. Enable forced-colors (e.g. DevTools → Rendering → "Emulate CSS media feature forced-colors: active" or Windows High Contrast).
    2. Open Combobox → With standalone field label, turn "disabled" on.
    3. Expect label and picker button (border/icon) to use GrayText.
  • No regressions: Existing combobox stories (sizes, quiet, invalid, readonly, etc.) still look and behave correctly.

    1. Run through Combobox stories (Default, disabled, invalid, quiet, readonly, etc.).
    2. Expect no visual or behavioral regressions.

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

@aramos-adobe aramos-adobe requested a review from a team as a code owner February 24, 2026 13:54
@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2026

⚠️ No Changeset found

Latest commit: f072ad7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@aramos-adobe aramos-adobe self-assigned this Feb 24, 2026
@aramos-adobe aramos-adobe added the Status:Ready for review PR ready for review or re-review. label Feb 25, 2026
@aramos-adobe aramos-adobe requested a review from nikkimk February 25, 2026 21:25
Copy link
Contributor

@nikkimk nikkimk left a comment

Choose a reason for hiding this comment

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

Looking good. I'm seeing some spacing differences between the label and the combobox we'll need to fix though.

Image Image Image

@rise-erpelding rise-erpelding self-assigned this Feb 26, 2026
@github-actions
Copy link
Contributor

📚 Branch Preview Links

🔍 First Generation Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-6047

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status:Ready for review PR ready for review or re-review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants