Components: Fix label and placeholder handling in LinkControlSearchInput#70096
Components: Fix label and placeholder handling in LinkControlSearchInput#70096Mamaduka merged 8 commits intoWordPress:trunkfrom
LinkControlSearchInput#70096Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
packages/block-editor/src/components/link-control/search-input.js
Outdated
Show resolved
Hide resolved
|
@im3dabasia, I think some failing e2e tests are caused by this change. We need to evaluate each of those, then A) Update the text if failure is expected after this change. |
|
@im3dabasia, do you mind rebasing this on top of the latest trunk? Thank you! |
Mamaduka
left a comment
There was a problem hiding this comment.
Thanks for working on this, @im3dabasia!
…nput` (WordPress#70096) Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
What?
This PR fixes accessibility issues in the LinkControlSearchInput component by ensuring proper handling of labels and placeholders in different scenarios.
Closes #69652
Why?
In #65458, changes were made to match the visible placeholder with the ARIA label, but this approach caused issues when the component has a visual label (when hideLabelFromVision is false), leading to overlapping text. This PR provides a more robust solution that addresses all accessibility scenarios.
How?
The solution properly handles labels and placeholders to ensure accessibility in all scenarios mentioned in the issue:
Testing Instructions