With your approach you get full control over the design of the βxβ, but it requires JS and you need to use care to make sure it remains accessible.
With <input type=βsearchβ /> you canβt change the look of the βxβ, but it will match their OS, which could be desirable! It also wonβt require JS to function and should be accessible.
Yes I know about that but I forgot to use π and i use some of code from my previous post
Well, as with everything... it has trade offs.
With your approach you get full control over the design of the βxβ, but it requires JS and you need to use care to make sure it remains accessible.
With
<input type=βsearchβ />
you canβt change the look of the βxβ, but it will match their OS, which could be desirable! It also wonβt require JS to function and should be accessible.I updated my code π