react-component / react-component/select

Missing aria-controls on serverside rendered markup

Open
#361 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
938
Forks
482
Avg merge
15h 8m
Merged PRs (30d)
2

Description

In the browser I see following warning:

Warning: Prop `aria-controls` did not match. Server: "null" Client: "f39da8e4-39ee-4446-f630-81e696c13dcf"

Server renders compopent as following:

<div id="language" class="rc-select rc-select-enabled"><div class="rc-select-selection
            rc-select-selection--single" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false" tabindex="0"><div class="rc-select-selection__rendered"><div class="rc-select-selection-selected-value" title="English" style="display:block;opacity:1">English</div></div><span class="rc-select-arrow" style="user-select:none;-webkit-user-select:none" unselectable="on"><i class="rc-select-arrow-icon"></i></span></div></div></div>

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the server-side rendering and browser hydration warning shown in the issue. Inspect the select component's server and client rendering paths for aria-controls, then verify that the rendered values match and the warning no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.