mirror of
https://github.com/penpot/penpot.git
synced 2025-07-23 10:47:19 +02:00
✨ Fix html-lang-missing accesibility issues
This commit is contained in:
parent
4ef876bf58
commit
6a329fac27
2 changed files with 5 additions and 0 deletions
|
@ -53,6 +53,10 @@
|
||||||
[^string title]
|
[^string title]
|
||||||
(set! (.-title globals/document) title))
|
(set! (.-title globals/document) title))
|
||||||
|
|
||||||
|
(defn set-html-lang!
|
||||||
|
[^string lang]
|
||||||
|
(.setAttribute (.querySelector js/document "html") "lang" lang))
|
||||||
|
|
||||||
(defn set-html-theme-color
|
(defn set-html-theme-color
|
||||||
[^string color scheme]
|
[^string color scheme]
|
||||||
(let [meta-node (.querySelector js/document "meta[name='theme-color']")]
|
(let [meta-node (.querySelector js/document "meta[name='theme-color']")]
|
||||||
|
|
|
@ -105,6 +105,7 @@
|
||||||
(add-watch locale ::browser-font
|
(add-watch locale ::browser-font
|
||||||
(fn [_ _ _ locale]
|
(fn [_ _ _ locale]
|
||||||
(log/info :hint "locale changed" :locale locale)
|
(log/info :hint "locale changed" :locale locale)
|
||||||
|
(dom/set-html-lang! locale)
|
||||||
(let [node (dom/get-body)]
|
(let [node (dom/get-body)]
|
||||||
(if (or (= locale "fa")
|
(if (or (= locale "fa")
|
||||||
(= locale "ar"))
|
(= locale "ar"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue