Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the new <search> element #11701

Closed
hugovk opened this issue Oct 3, 2023 · 1 comment · Fixed by #11704
Closed

Use the new <search> element #11701

hugovk opened this issue Oct 3, 2023 · 1 comment · Fixed by #11704
Labels

Comments

@hugovk
Copy link
Contributor

hugovk commented Oct 3, 2023

There's also a new <search> element:

https://webkit.org/blog/14445/webkit-features-in-safari-17-0/

Perhaps we can replace this <div>?

<div id="searchbox" style="display: none" role="search">

The article mentions the ARIA role="search" should be kept until there's wider browser support.

Originally posted by @hugovk in #11697 (comment)

@hugovk
Copy link
Contributor Author

hugovk commented Oct 3, 2023

And #11697 (comment):

It seems very new. However, From Safari's blog post:

We are excited to be the first browser to ship this new <search> element, now supported in Safari 17.0.
...
Browsers without support for the search element will recognize there is an element present, and they will recognize any attributes it has — including roles, IDs, and classes. It will simply behave like a generic element, as if it were a <div>. Because of this, we recommend you include an ARIA search role on the <search> element for now. By using <search role="search">, you will ensure every user has the intended experience. And in the future, when all browsers have support, you can drop the ARIA search role.
In the meantime, you can start using <search> today with confidence, long before a significant percent [sic] of your audience use browsers with support.

So it seems that even though only one browser supports the element, we can start using it, and nothing will break.

A

@hugovk hugovk changed the title Use the new new <search> element Use the new <search> element Oct 3, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants