Skip to content

[Select] "&ZeroWidthSpace" is being rendered as child element #41515

@tejasparkar

Description

@tejasparkar

Steps to reproduce

Link to live example: (required)

Steps:
1.Open the url https://mui.com/material-ui/react-select/
2. Inspect the code in browser
3. Try navigation with screen reader and observe
Capture

Current behavior

<span className="notranslate">&#8203;</span>

<Button {...buttonProps}>
    {renderValue(selectedOptionsMetadata) ?? placeholder ?? (
      // fall back to a zero-width space to prevent layout shift
      // from https://github.com/mui/material-ui/pull/24563
      <span className="notranslate">&#8203;</span>
    )}
  </Button>

No response

Expected behavior

<Button {...buttonProps}>
    {renderValue(selectedOptionsMetadata) ?? placeholder ?? (
      // fall back to a zero-width space to prevent layout shift
      // from https://github.com/mui/material-ui/pull/24563
      <span aria-hidden="true" className="notranslate">&#8203;</span>
    )}
  </Button>

No response

Context

No response

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: accessibility

Metadata

Metadata

Assignees

Labels

accessibilitya11yready to takeHelp wanted. Guidance available. There is a high chance the change will be acceptedscope: selectChanges related to the select.scope: text fieldChanges related to the text field.type: bugIt doesn't behave as expected.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions