Skip to content

Conversation

@mj12albert
Copy link
Member

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 19, 2026

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@3786
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@3786
    

commit: 97ddf8a

@mui-bot
Copy link

mui-bot commented Jan 19, 2026

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

</Autocomplete.Portal>
</Autocomplete.Root>
<Field.Label data-testid="label" render={<span />} />
<Field.Label data-testid="label" render={<span />} nativeLabel={false} />
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure how this is passing in CI, when run locally it errors

@mj12albert mj12albert marked this pull request as ready for review January 19, 2026 06:36
@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 97ddf8a
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/696dd06933eb5f0008181f16
😎 Deploy Preview https://deploy-preview-3786--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@greptile-apps
Copy link

greptile-apps bot commented Jan 19, 2026

Greptile Summary

Fixed tests that were using Field.Label with custom render elements (render={<span />}) by explicitly setting nativeLabel={false}. This ensures tests correctly expect non-native label behavior where labels don't use the for attribute and instead rely on aria-labelledby for accessibility.

Changes:

  • AutocompleteRoot.test.tsx: Added nativeLabel={false} to match the non-native rendering
  • SwitchRoot.test.tsx: Added nativeLabel={false} and corrected assertions to expect for attribute to be null (not present) and removed checks for the input element's for relationship

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward test fixes that correctly align test setup with expected behavior. The nativeLabel={false} prop explicitly declares the label is rendered as a non-native element (span), and test assertions were updated accordingly to expect non-native behavior (no for attribute). The changes match the component's API contract as documented in FieldLabel.tsx lines 101-111.
  • No files require special attention

Important Files Changed

Filename Overview
packages/react/src/autocomplete/root/AutocompleteRoot.test.tsx Added nativeLabel={false} prop to Field.Label with custom render element to correctly test non-native label behavior
packages/react/src/switch/root/SwitchRoot.test.tsx Added nativeLabel={false} prop and corrected test assertions to expect non-native label behavior (no for attribute, no input element querying)

@greptile-apps
Copy link

greptile-apps bot commented Jan 19, 2026

Greptile found no issues!

From now on, if a review finishes and we haven't found any issues, we will not post anything, but you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

@mj12albert mj12albert merged commit 139af29 into mui:master Jan 19, 2026
24 checks passed
@mj12albert mj12albert deleted the test/non-native-labels branch January 19, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants