-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Classic theme site preview: Make all interactive elements unclickable #69522
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
Conversation
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. |
Size Change: -19 B (0%) Total Size: 1.84 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.
Thanks, @t-hamano!
The fix works as expected ✅
I noticed that users are still able to select text in iframe
. Is this intentional? Have we considered setting the inert
attribute for iframe body?
cc @afercia
Flaky tests detected in f4fb1ec. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/13779973440
|
The inert attribute would also remove elements from the accessibility tree, they would not be exposed to assistive technoloiges any longer. Users would not be able tp 'read' the content with |
Thanks for the review! Based on the feedback, it seems best to not use the |
…#69522) Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: afercia <afercia@git.wordpress.org>
I just cherry-picked this PR to the wp/6.8 branch to get it included in the next release: 6c75f56 |
…WordPress#69522) Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: afercia <afercia@git.wordpress.org>
What?
Found while working on #69474
This PR makes "all" interactive elements unclickable in the classic theme site preview.
Why?
The current logic doesn't make interactive all elements unclickable. For example, textarea, content editable div, div element with tabindex="0":
996d390392ee268e37d74e98acb72df2.mp4
How?
Use
focus.focusable
method from@wordpress/dom
package to check all interactive elements.Testing Instructions