Skip to content

ListBoxItem removes aria attributes in Safari, causing hydration issues #9706

@cbodin

Description

@cbodin

Provide a general summary of the issue here

Aria attributes are removed client-side from the ListBoxItem in Safari, causing accessibility and hydration issues.

🤔 Expected Behavior?

Aria attributes should preferably not be removed.

😯 Current Behavior

Next.js shows hydration issues when using SSR and ListBox.

💁 Possible Solution

No response

🔦 Context

I am trying to use ListBox with SSR to create a list of items with a fancy design but i want to provide a custom text for screen readers to better understand the focused item.

🖥️ Steps to Reproduce

Open the following in Safari and preview the site. Nextjs will show hydration errors. https://codesandbox.io/p/devbox/2fycxh

Version

1.15.1

What browsers are you seeing the problem on?

Safari

If other, please specify.

No response

What operating system are you using?

MacOS 26.3

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions