-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add missing "type" to the search field on the editor #40782
Conversation
Size Change: +4 B (0%) Total Size: 1.23 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it could be worth getting accessibility feedback on this. The change makes screenreaders announce this input as a search field, but it isn't a search field, it's an input for setting the placeholder test. |
There seems to be no A11Y concerns that I know about here. I do see stuff about how |
The way I was thinking about it here is that using |
@aristath In this case, |
Hmmm OK... I didn't know that, thank you! So yay or nay for adding it? If it's mostly for visuals, then it should not have a negative impact on screen readers, right? (Thank you for the timely response!) |
If there are no accessibility concerns, then adding the type makes the front and editor match, and makes it easier for theme developers to style all search input fields with the same styles. |
@aristath It really should not effect accessibility. I made a test in my own browser to check it and |
Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍
What?
Adds a missing
type="search"
to the search field in the editor.Why?
type="search"
gets added, while on the editor it does not exist[type="search"]
. This change allows using the same CSS both on the front and the editor, thus eliminating the need for a separate editor stylesheet (for example Tailwind uses that selector)How?
Adds
type="search"
to the input field inedit.js
Testing Instructions
Add a search block and confirm that it has the type defined.