public function htmlAttributes()
    {
        if ($this->direction() === 'rtl' || $this->direction() !== $this->script()->direction()) {
            return 'lang="' . $this->languageTag() . '" dir="' . $this->direction() . '"';
        } else {
            return 'lang="' . $this->languageTag() . '"';
        }
    }