JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.63k stars 4.13k forks source link

Input on css is not valid. #5351

Open riimako opened 2 years ago

riimako commented 2 years ago

Hey! I am using the react-select in my project, and the W3 validator gives me this Error: CSS: label: Property label doesn't exist.

From line 50, column 62128; to line 50, column 62549
-value=""><input type="text" class="reactSelect__input" style="label:input;color:inherit;background:0;opacity:…x="0" value="" aria-autocomplete="list" aria-expanded="false" aria-haspopup="true" role="combobox"/></div>

Referenced code is here: https://github.com/JedWatson/react-select/blob/564a14306f3086a83b959ca89eaa909eeb4db77c/packages/react-select/src/components/Input.tsx#L81 https://github.com/JedWatson/react-select/blob/b0411ff46bc1ecf45d9bca4fb58fbce1e57f847c/packages/react-select/src/components/Input.js#L32

This is not valid css, and should not be there, to see more about css properties click.

This should be easy fix, and maybe you want to use aria-label?

Thanks!

levipadre commented 1 year ago

I have the same issue. Any fix for this?

htech9 commented 1 month ago

The referenced code is still present at last version at time of writing

https://github.com/JedWatson/react-select/blob/a8b8f4342cc113e921bb238de2dd69a2d345b5f8/packages/react-select/src/components/Input.tsx#L88

although I was not able to make it rendered live.

@ebonow Since it is introduced from your commit at https://github.com/JedWatson/react-select/commit/2ad934545#diff-07753302222b58b652fb23698902955708f7f700fdeecf15980423588766fef4R77, is there a particular reason why you introduced this label: 'input' line ?