0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

Fix html-lang-missing accesibility issues

This commit is contained in:
Pablo Alba 2022-09-28 13:16:36 +02:00
parent 4ef876bf58
commit 6a329fac27
2 changed files with 5 additions and 0 deletions

View file

@ -53,6 +53,10 @@
[^string title]
(set! (.-title globals/document) title))
(defn set-html-lang!
[^string lang]
(.setAttribute (.querySelector js/document "html") "lang" lang))
(defn set-html-theme-color
[^string color scheme]
(let [meta-node (.querySelector js/document "meta[name='theme-color']")]

View file

@ -105,6 +105,7 @@
(add-watch locale ::browser-font
(fn [_ _ _ locale]
(log/info :hint "locale changed" :locale locale)
(dom/set-html-lang! locale)
(let [node (dom/get-body)]
(if (or (= locale "fa")
(= locale "ar"))