Repository navigation
Conversation
🤖 PR meta 🤖🎉 PropsUnlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @martin-neumann-gurus. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. Updated as activity occurs, without notifying anyone named here. Add the 🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. |
What?
Closes #54150
Sets the
langattribute of the editor canvas iframe's<html>to match the admin page, and stops adding an emptydirfor left-to-right languages.Why?
Without
lang,:lang()theme styles,hyphens: autoand browser spellcheck language detection don't work in the editor. This uses the user's language, as the classic editor does; using the site or post language when it differs is #52777.How?
Iframecopieslanganddirfrom the admin page's<html>when they are set.Testing Instructions
<html class="block-editor-iframe__html">.langas the admin page's<html>(for exampleen-US).dirattribute.<html>.lang="ar"anddir="rtl", matching the admin page's<html>.Use of AI Tools
Authored with Claude Code under direction and review; all results above were run locally.