-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Search Block: remove id attribute from svg #40828
Conversation
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.
@amustaque97 One note below.
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.
Thanks for opening up this PR to address the issue!
I was wondering if instead of creating a unique id, if we could remove the id
attribute altogether from the SVG icon. Does anyone know if the id
attribute is currently in use for anything? I couldn't see anywhere that it's currently used for hooking into anything, and we already have a classname attached if folks are needing to target the icon in any theming, so I wondered if it'd be easier to remove it.
It looks like the SVG icon was originally added to the file (with the id
included) in #24666.
@alexstine do you know if an id
attribute on the svg
element is required at all for accessibility, or if it's safe to remove?
@andrewserong Should be safe to remove. SVGs are hidden to screen readers anyway. 👍 |
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.
Looks good to me. Thanks, @amustaque97!
Fixes: #40823
What?
id
was same for every instance of search block in the given page/post.Why?
id
property should be removed so that it should not be same for every instance of search block which violates standards.How?
Testing Instructions
search
blocks in that page/post.id
attribute.Screenshots or screencast