Missing lang attribute on html tag in neos ui

Hi Folks,

is there a reason why <html lang="..."> is just rendered on live workspace?

in case of some rtl issues on arabic language i’m using the lang=“ar” attribute on the html tag for detecting the language with css.
Now i realized, that the lang tag is only set if the page is rendered in the frontend

<html lang="ar">

but if the page is rendered in backend, than the lang attribute is missed.

<html style="margin: 0px auto;">

For my better understanding, is there a reason for that behavior?

I fixed this now for this project with this fusion:

prototype(Vendor.Site:Document.AbstractPage) < prototype(Neos.Neos:Page) {

    htmlTag.attributes = Neos.Fusion:DataStructure {
        lang = ${Array.first(node.context.dimensions.language)}
    // ....

I don’t know what then reason for that was. Maybe historic due to the old Neos UI.

But you can also override the condition in Neos.Seo and open an issue in its repo for the topic. Don’t see a reason not to change this