-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
iframe: document needs language attributes #54150
Comments
#52777 describes a problem in the site editor when the profile language does not match the site language. The missing/inaccurate attributes in the |
#52777 is a separate issue and Twenty Seventeen has additional issues (outdated classes). However, the non-latin language font styles for Twenty Nineteen worked in previous releases and the iframe editor created a new bug (regression). |
I am adding the following CSS to adjust the kerning according to the language.
This CSS will be applied on the frontend and on non iframe editor, but not on iframe editor. |
I started working on this in https://github.com/sabernhardt/gutenberg/pull/2/files
I found one set of conditions in which the mismatch between the languages for the user profile and the site (or individual post) may need special consideration when setting the
If the |
Description
The iframe editor does not include a
lang
attribute, either for the site's language or for a post's language (which can be different from the main site language on multilingual sites).gutenberg/packages/block-editor/src/components/iframe/index.js
Line 195 in c7ff22a
Accessibility Conformance rules may make an exception for embedded pages, but any styles for specific languages cannot be applied without the
lang
attribute inside theiframe
. This includes font selection in themes such as Twenty Seventeen and Twenty Nineteen (Twenty Twenty's inline style still works, though).Step-by-step reproduction instructions
html
element within theiframe
. If you do not find aniframe
, you may need to deactivate plugins. (And if you have the Custom Fields panel showing, you will need to hide that too.)html
does not have alang
attribute and thedir
attribute is empty (instead ofltr
).html
element within theiframe
again. Thehtml
does not have alang
attribute in this case either, but thedir
attribute can accurately bertl
if your profile is set to the site language.html
element within theiframe
there. As in the post editor, LTR languages have an emptydir
attribute, RTL languages havedir="rtl"
for the direction, and all lack thelang
attribute.Screenshots, screen recording, code snippet
With Twenty Nineteen, Arabic should be in Tahoma (sans-serif), but the iframe editor continues to use the serif typeface (shown in Garamond).
In left-to-right languages, the
dir
attribute is empty.Environment info
WordPress 6.3.1 with Gutenberg 16.5.1
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: