You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
Accessibility Conformance rules may make an exception for embedded pages, but any styles for specific languages cannot be applied without the lang attribute inside the iframe. 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
Go to the site's General Settings and select English as the language.
Activate Twenty Nineteen (or Twenty Seventeen) as your theme.
Open an existing post with text. If you do not have any, create a new post and add a paragraph.
Use the browser's Inspect Element feature on an element within the post content area.
Check the html element within the iframe. If you do not find an iframe, you may need to deactivate plugins. (And if you have the Custom Fields panel showing, you will need to hide that too.)
Notice that the html does not have a lang attribute and the dir attribute is empty (instead of ltr).
Go to the site's General Settings and choose a right-to-left language such as Persian, Hebrew or Arabic.
Revisit the earlier post and refresh the browser.
Inspect Element and check the html element within the iframe again. The html does not have a lang attribute in this case either, but the dir attribute can accurately be rtl if your profile is set to the site language.
View/preview the post to see the theme's intended font for this language, and note that the editor does not match it.
Activate Twenty Twenty-Three as your theme.
If you would like, change the language.
Go to the (site) editor and use the browser's Inspect Element feature to view the html element within the iframe there. As in the post editor, LTR languages have an empty dir attribute, RTL languages have dir="rtl" for the direction, and all lack the lang 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:
#52777 describes a problem in the site editor when the profile language does not match the site language. The missing/inaccurate attributes in the iframe may be the root cause for that.
#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).
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: