@justai/cuts 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/LangPicker.astro +8 -1
package/package.json
CHANGED
package/src/LangPicker.astro
CHANGED
|
@@ -24,7 +24,14 @@ const { current, locales, localeNames, localePath, label, searchLabel } = Astro.
|
|
|
24
24
|
<button class="trigger" type="button" aria-haspopup="listbox" aria-expanded="false" data-trigger aria-label={`${label}: ${current.toUpperCase()}`} title={label}>{current.toUpperCase()}</button>
|
|
25
25
|
|
|
26
26
|
<div class="menu" role="listbox" data-menu hidden>
|
|
27
|
-
|
|
27
|
+
{/* `name` and not `id`: a form field with neither makes the browser complain that it cannot
|
|
28
|
+
autofill (Chrome's Issues panel flags it on every page of the fleet, since this cut is on
|
|
29
|
+
every page). `name` answers it without the one risk an `id` would carry — an id must be
|
|
30
|
+
unique in a document, so a persona that ever renders two pickers would ship invalid HTML,
|
|
31
|
+
and a shared cut must be safe to place twice. Prefixed `lang-` so it cannot collide with a
|
|
32
|
+
persona's own field of the same idea. The value is never submitted: this input lives in no
|
|
33
|
+
form and filters the list client-side. */}
|
|
34
|
+
<input type="search" class="search" name="lang-search" placeholder={searchLabel} autocomplete="off" spellcheck="false" data-search aria-label={searchLabel} />
|
|
28
35
|
<div class="list" data-list>
|
|
29
36
|
{locales.map((l) => (
|
|
30
37
|
<a
|