(defn render-attr! [tag key value sb]
(let [attr (normalize-attr-key key)]
(cond
(= "type" attr) :nop ;; rendered manually in render-element! before id
(= "style" attr) (render-style! value sb)
(= "key" attr) :nop
(= "ref" attr) :nop
(= "class" attr) :nop
(and (= "value" attr)
(or (= "select" tag)
(= "textarea" tag))) :nop
(.startsWith attr "aria-") (render-attr-str! sb attr value)
(not value) :nop
(true? value) (append! sb " " attr "=\"\"")
(.startsWith attr "on") :nop
(= "dangerouslySetInnerHTML" attr) :nop
:else (render-attr-str! sb attr value))))