(derive-aria-label resolved-tokens label-raw)Author-supplied label-raw wins verbatim. Otherwise join :aria names with
" plus ". Empty when no tokens and no label.
Author-supplied `label-raw` wins verbatim. Otherwise join `:aria` names with " plus ". Empty when no tokens and no label.
(normalize {:keys [keys-raw separator-raw size-raw platform-raw label-raw]})Inputs: :keys-raw string | nil :separator-raw string | nil :size-raw string | nil :platform-raw string | nil ("mac"|"win"|"linux"; "auto" is resolved by the caller before reaching this fn) :label-raw string | nil Output: :tokens vector of {:visible :aria} maps (empty in slot mode) :separator string (single char) :size string ("sm"|"md"|"lg") :platform string ("mac"|"win"|"linux") :label string (derived or author-supplied) :slot-mode? boolean (true when no tokens parsed)
Inputs:
:keys-raw string | nil
:separator-raw string | nil
:size-raw string | nil
:platform-raw string | nil ("mac"|"win"|"linux"; "auto" is resolved
by the caller before reaching this fn)
:label-raw string | nil
Output:
:tokens vector of {:visible :aria} maps (empty in slot mode)
:separator string (single char)
:size string ("sm"|"md"|"lg")
:platform string ("mac"|"win"|"linux")
:label string (derived or author-supplied)
:slot-mode? boolean (true when no tokens parsed)(parse-separator s)Single non-empty character; otherwise default.
Single non-empty character; otherwise default.
(resolve-platform platform-attr detected)Map (possibly "auto") platform attr value plus a UA-detected fallback to a concrete platform string ("mac"|"win"|"linux").
Map (possibly "auto") platform attr value plus a UA-detected fallback to a
concrete platform string ("mac"|"win"|"linux").(resolve-token platform raw-token)Map a raw input token to {:visible :aria} for the given resolved platform. Unknown tokens pass through (visible = aria = trimmed input).
Map a raw input token to {:visible :aria} for the given resolved platform.
Unknown tokens pass through (visible = aria = trimmed input).(split-keys keys-raw separator)Split a combo string on separator into trimmed, non-empty tokens.
Split a combo string on `separator` into trimmed, non-empty tokens.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |