@yuneta/gobj-ui 7.26.41 → 7.26.42

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.
@@ -704,12 +704,42 @@ function paint_badge($badge, value, tone) {
704
704
  * All Rights Reserved.
705
705
  ***********************************************************************/
706
706
  /************************************************************
707
+ * The label of a row is the name of its CONTROL: one rule names
708
+ * an item everywhere.
709
+ *
710
+ * - A menu entry, as the nav names it (c_yui_nav.js item_li):
711
+ * its `name`, else its `aria_label`, else its id.
712
+ * - A toolbar item and a row of its dropdown, as the toolbar
713
+ * names them (c_yui_shell.js build_toolbar_*): its
714
+ * `aria_label` first -- the visible `name` of a toolbar
715
+ * button is often a symbol ("ES/EN") --, then its `name`,
716
+ * then, for an avatar or a connection dot, the library's own
717
+ * key, else its id.
718
+ *
719
+ * A route is no key: it has its own column, and an item with
720
+ * none of these has no label. Up to 7.26.41 a row was labelled
721
+ * `name || wordmark || id || route` -- an entry that declares
722
+ * only an `aria_label` had its id here, the language button read
723
+ * "ES/EN" where its control says "toggle language", and a route
724
+ * was asked of the locales as a key.
725
+ ************************************************************/
726
+ function menu_item_label(it) {
727
+ return it.name || it.aria_label || it.id || "";
728
+ }
729
+ function toolbar_item_label(it) {
730
+ let fallback = it.id || "";
731
+ if (it.type === "avatar") fallback = "user menu";
732
+ else if (it.type === "connection") fallback = "backend connection";
733
+ return it.aria_label || it.name || fallback;
734
+ }
735
+ /************************************************************
707
736
  * One node of the nav map from a declared config item, in
708
737
  * DECLARATION ORDER (never sorted). Recurses into static submenus
709
738
  * and toolbar dropdowns, and merges the LIVE dynamic submenu tabs
710
739
  * (added at runtime via yui_shell_set_submenu) by parent id.
740
+ * `label_of` names it: menu_item_label() or toolbar_item_label().
711
741
  ************************************************************/
712
- function nav_node_from_item(it, index) {
742
+ function nav_node_from_item(it, index, label_of) {
713
743
  if (!it || it.type === "divider" || it.type === "header") return null;
714
744
  let action = it.action || {};
715
745
  let route = it.route || (action.type === "navigate" ? action.route : "") || "";
@@ -722,7 +752,7 @@ function nav_node_from_item(it, index) {
722
752
  }
723
753
  let node = {
724
754
  id: it.id || "",
725
- label: it.name || it.wordmark || it.id || route || "",
755
+ label: label_of(it),
726
756
  icon: it.icon || "",
727
757
  route,
728
758
  event,
@@ -732,14 +762,14 @@ function nav_node_from_item(it, index) {
732
762
  };
733
763
  let sub_items = it.submenu && Array.isArray(it.submenu.items) ? it.submenu.items : action.type === "dropdown" && Array.isArray(action.items) ? action.items : null;
734
764
  if (sub_items) for (let s of sub_items) {
735
- let n = nav_node_from_item(s, index);
765
+ let n = nav_node_from_item(s, index, label_of);
736
766
  if (n) node.children.push(n);
737
767
  }
738
768
  if (it.id && index) for (let r of Object.keys(index)) {
739
769
  let e = index[r];
740
770
  if (e && e.parent_item && e.parent_item.id === it.id && !node.children.some((c) => c.route === r)) node.children.push({
741
771
  id: e.item && e.item.id || "",
742
- label: e.item && e.item.name || r,
772
+ label: e.item ? menu_item_label(e.item) : "",
743
773
  icon: e.item && e.item.icon || "",
744
774
  route: r,
745
775
  event: "",
@@ -855,7 +885,10 @@ function mark_current(groups, current_route) {
855
885
  *
856
886
  * - `nav` walks EVERY declared menu in declaration order: the
857
887
  * `primary` menu contributes its items flat (the common case);
858
- * any other menu contributes a group node labelled by its key.
888
+ * any other menu contributes a group node labelled by its key,
889
+ * as data (`data_label: true`).
890
+ * - a node is labelled as its control is named (menu_item_label(),
891
+ * toolbar_item_label()); a node no item names has label "".
859
892
  * - `other` lists the routes declared only in the route table
860
893
  * (config.shell.routes) that no rendered node covers — root "/",
861
894
  * URL-only action routes, toolbar-less forms. Brand-covered
@@ -890,7 +923,7 @@ function build_nav_map(input) {
890
923
  };
891
924
  continue;
892
925
  }
893
- let n = nav_node_from_item(it, index);
926
+ let n = nav_node_from_item(it, index, toolbar_item_label);
894
927
  if (n) toolbar.push(n);
895
928
  }
896
929
  let nav = [];
@@ -900,13 +933,14 @@ function build_nav_map(input) {
900
933
  if (!m || !Array.isArray(m.items)) continue;
901
934
  let nodes = [];
902
935
  for (let it of m.items) {
903
- let n = nav_node_from_item(it, index);
936
+ let n = nav_node_from_item(it, index, menu_item_label);
904
937
  if (n) nodes.push(n);
905
938
  }
906
939
  if (menu_id === "primary") nav = nav.concat(nodes);
907
940
  else if (nodes.length) nav.push({
908
941
  id: menu_id,
909
942
  label: menu_id,
943
+ data_label: true,
910
944
  icon: "",
911
945
  route: "",
912
946
  event: "",
@@ -933,7 +967,7 @@ function build_nav_map(input) {
933
967
  let tgt = e && e.target || null;
934
968
  other.push({
935
969
  id: e && e.item && e.item.id || "",
936
- label: e && e.item && (e.item.name || e.item.id) || r,
970
+ label: e && e.item ? menu_item_label(e.item) : "",
937
971
  icon: e && e.item && e.item.icon || "",
938
972
  route: r,
939
973
  event: tgt && tgt.kind === "action" && tgt.event || "",
@@ -1013,7 +1047,7 @@ function section_index_target(menu_id, item) {
1013
1047
  gclass: "C_YUI_NAV",
1014
1048
  kw: {
1015
1049
  menu_id: `index.${menu_id}.${item.id}`,
1016
- nav_label: item.name || item.id || "",
1050
+ nav_label: item.name || item.aria_label || item.id || "",
1017
1051
  menu_items: sub.items,
1018
1052
  layout: "cards",
1019
1053
  level: "secondary"
@@ -1085,7 +1119,7 @@ function secondary_nav_renders(item, layout) {
1085
1119
  * Constants
1086
1120
  ***************************************************************/
1087
1121
  var GCLASS_NAME$22 = "C_YUI_SHELL";
1088
- var __last_shell__ = null;
1122
+ var __live_shells__ = [];
1089
1123
  var __shell_watchers__ = [];
1090
1124
  var __window_z__ = 10;
1091
1125
  var ZONE_IDS = [
@@ -1128,6 +1162,8 @@ var PRIVATE_DATA$22 = {
1128
1162
  item_index: {},
1129
1163
  nav_badges: {},
1130
1164
  badge_status: null,
1165
+ badge_news: [],
1166
+ badge_news_closing: false,
1131
1167
  dynamic_items: {},
1132
1168
  section_pos: {},
1133
1169
  route_mru: [],
@@ -1166,7 +1202,7 @@ var __gclass__$22 = null;
1166
1202
  function mt_create$22(gobj) {
1167
1203
  const subscriber = gobj_read_pointer_attr(gobj, "subscriber");
1168
1204
  if (subscriber) gobj_subscribe_event(gobj, null, {}, subscriber);
1169
- __last_shell__ = gobj;
1205
+ __live_shells__.push(gobj);
1170
1206
  build_ui$19(gobj);
1171
1207
  tell_shell_watchers(gobj);
1172
1208
  }
@@ -1352,7 +1388,8 @@ function mt_stop$20(gobj) {
1352
1388
  ***************************************************************/
1353
1389
  function mt_destroy$22(gobj) {
1354
1390
  close_toolbar_dropdown(gobj);
1355
- if (__last_shell__ === gobj) __last_shell__ = null;
1391
+ let live_idx = __live_shells__.indexOf(gobj);
1392
+ if (live_idx >= 0) __live_shells__.splice(live_idx, 1);
1356
1393
  let $container = gobj_read_attr(gobj, "$container");
1357
1394
  if ($container && $container.parentNode) $container.parentNode.removeChild($container);
1358
1395
  tell_shell_watchers(gobj);
@@ -1735,7 +1772,7 @@ function instantiate_menus(gobj, config) {
1735
1772
  let nav = instantiate_nav_in_zone(gobj, {
1736
1773
  items: sub.items,
1737
1774
  render: { [zone_id]: render_cfg }
1738
- }, sub_menu_id, zone_id, "secondary", item.name || "");
1775
+ }, sub_menu_id, zone_id, "secondary", item.name || item.aria_label || item.id || "");
1739
1776
  let $c = gobj_read_attr(nav, "$container");
1740
1777
  if ($c) $c.classList.add("is-hidden");
1741
1778
  }
@@ -2103,25 +2140,24 @@ function build_toolbar_action_item(gobj, it) {
2103
2140
  },
2104
2141
  text_node(it.name)
2105
2142
  ]);
2106
- let aria_key = it.aria_label || it.name || it.id || "";
2107
- let i18n_aria = it.aria_label || it.name;
2143
+ let name_key = it.aria_label || it.name || it.id || "";
2108
2144
  let btn_attrs = {
2109
2145
  class: "navbar-item yui-toolbar-item is-unselectable",
2110
2146
  type: "button",
2111
2147
  "data-toolbar-item-id": it.id || "",
2112
- "aria-label": aria_key
2148
+ "aria-label": name_key
2113
2149
  };
2114
- if (i18n_aria) btn_attrs["data-i18n-aria-label"] = i18n_aria;
2150
+ if (name_key) btn_attrs["data-i18n-aria-label"] = name_key;
2115
2151
  if ((it.action && it.action.type || "") === "dropdown") {
2116
2152
  btn_attrs["aria-haspopup"] = "menu";
2117
2153
  btn_attrs["aria-expanded"] = "false";
2118
2154
  }
2119
- let tip = it.tooltip || i18n_aria;
2155
+ let tip = it.tooltip || name_key;
2120
2156
  if (tip) {
2121
2157
  btn_attrs.title = tip;
2122
2158
  btn_attrs["data-i18n-title"] = tip;
2123
2159
  }
2124
- if (badge && !empty_string(aria_key)) name_control_with_badge(btn_attrs, badge);
2160
+ if (badge && !empty_string(name_key)) name_control_with_badge(btn_attrs, badge);
2125
2161
  let link = toolbar_link_attrs(it);
2126
2162
  if (link) {
2127
2163
  delete btn_attrs.type;
@@ -2205,21 +2241,20 @@ function build_toolbar_brand_item(gobj, it) {
2205
2241
  ************************************************************/
2206
2242
  function build_toolbar_avatar_item(gobj, it) {
2207
2243
  let priv = gobj.priv;
2208
- const aria_key = it.aria_label || it.name || it.id || "user menu";
2209
- const i18n_aria = it.aria_label || it.name || "user menu";
2244
+ const name_key = it.aria_label || it.name || "user menu";
2210
2245
  let action_type = it.action && it.action.type || "";
2211
2246
  let attrs = {
2212
2247
  class: "navbar-item yui-toolbar-item yui-toolbar-avatar is-unselectable",
2213
2248
  type: "button",
2214
2249
  "data-toolbar-item-id": it.id || "",
2215
- "aria-label": aria_key,
2216
- "data-i18n-aria-label": i18n_aria
2250
+ "aria-label": name_key,
2251
+ "data-i18n-aria-label": name_key
2217
2252
  };
2218
2253
  if (action_type === "dropdown") {
2219
2254
  attrs["aria-haspopup"] = "menu";
2220
2255
  attrs["aria-expanded"] = "false";
2221
2256
  }
2222
- let tip = it.tooltip || i18n_aria;
2257
+ let tip = it.tooltip || name_key;
2223
2258
  if (tip) {
2224
2259
  attrs.title = tip;
2225
2260
  attrs["data-i18n-title"] = tip;
@@ -2282,16 +2317,15 @@ function attach_context_action(gobj, $item, it) {
2282
2317
  ************************************************************/
2283
2318
  function build_toolbar_connection_item(gobj, it) {
2284
2319
  let priv = gobj.priv;
2285
- const aria_key = it.aria_label || it.name || it.id || "backend connection";
2286
- const i18n_aria = it.aria_label || it.name || "backend connection";
2320
+ const name_key = it.aria_label || it.name || "backend connection";
2287
2321
  let attrs = {
2288
2322
  class: "navbar-item yui-toolbar-item yui-toolbar-conn is-unselectable is-disconnected",
2289
2323
  type: "button",
2290
2324
  "data-toolbar-item-id": it.id || "",
2291
- "aria-label": aria_key,
2292
- "data-i18n-aria-label": i18n_aria
2325
+ "aria-label": name_key,
2326
+ "data-i18n-aria-label": name_key
2293
2327
  };
2294
- let tip = it.tooltip || i18n_aria;
2328
+ let tip = it.tooltip || name_key;
2295
2329
  if (tip) {
2296
2330
  attrs.title = tip;
2297
2331
  attrs["data-i18n-title"] = tip;
@@ -2389,13 +2423,12 @@ function toggle_toolbar_dropdown(gobj, item, action, $trigger) {
2389
2423
  function open_toolbar_dropdown(gobj, item, action, $trigger) {
2390
2424
  let priv = gobj.priv;
2391
2425
  if (!priv || !priv.layers || !priv.layers.popup) return;
2392
- const aria_key = item && (item.aria_label || item.name || item.id) || "menu";
2393
- const i18n_aria = item && (item.aria_label || item.name) || "menu";
2426
+ const name_key = item && (item.aria_label || item.name || (classify_toolbar_item(item) === "avatar" ? "user menu" : item.id)) || "menu";
2394
2427
  let $panel = createElement2(["div", {
2395
2428
  class: "yui-toolbar-dropdown-panel",
2396
2429
  role: "menu",
2397
- "aria-label": aria_key,
2398
- "data-i18n-aria-label": i18n_aria,
2430
+ "aria-label": name_key,
2431
+ "data-i18n-aria-label": name_key,
2399
2432
  "data-toolbar-dropdown-for": item && item.id || ""
2400
2433
  }]);
2401
2434
  let raw_items = is_array(action.items) ? action.items : [];
@@ -2528,20 +2561,19 @@ function build_dropdown_row(gobj, sub, idx) {
2528
2561
  "aria-hidden": "true"
2529
2562
  }]
2530
2563
  ]);
2531
- let aria_key = sub.aria_label || sub.name || sub.id || "";
2532
- let i18n_aria = sub.aria_label || sub.name;
2564
+ let name_key = sub.aria_label || sub.name || sub.id || "";
2533
2565
  let attrs = {
2534
2566
  class: "yui-toolbar-dropdown-item" + (sub.selected ? " is-selected" : ""),
2535
2567
  type: "button",
2536
2568
  role: "menuitemradio",
2537
2569
  "aria-checked": sub.selected ? "true" : "false",
2538
2570
  "data-dropdown-item-id": sub.id || "",
2539
- "aria-label": aria_key
2571
+ "aria-label": name_key
2540
2572
  };
2541
- if (i18n_aria) {
2542
- attrs["data-i18n-aria-label"] = i18n_aria;
2543
- attrs.title = i18n_aria;
2544
- attrs["data-i18n-title"] = i18n_aria;
2573
+ if (name_key) {
2574
+ attrs["data-i18n-aria-label"] = name_key;
2575
+ attrs.title = name_key;
2576
+ attrs["data-i18n-title"] = name_key;
2545
2577
  }
2546
2578
  let $btn = createElement2([
2547
2579
  "button",
@@ -2963,11 +2995,23 @@ function shell_navs(gobj) {
2963
2995
  * `name_key` is the key of the control's name; the phrase is a
2964
2996
  * key of its own, so a language orders and punctuates it its
2965
2997
  * way. Said once: a live region needs no re-translation.
2966
- ************************************************************/
2967
- function announce_badge(gobj, name_key, text) {
2968
- let priv = gobj.priv;
2969
- let $status = priv.badge_status;
2970
- if (!$status) {
2998
+ *
2999
+ * `source` names the badge ("toolbar:<id>", "nav:<id>"). Every
3000
+ * change of ONE turn of the loop is said in ONE message, a line
3001
+ * of the region each, in the order they came; a badge that moves
3002
+ * twice in the turn says its last count. Up to 7.26.41 each
3003
+ * change replaced the region's text, and a reader hears the
3004
+ * region as it is when the turn is over: of two changes in one
3005
+ * action (a feed that updates the toolbar's count and the menu
3006
+ * entry's, which is what a count is for) only the second was
3007
+ * ever said. The turn is closed by EV_CLOSE_BADGE_NEWS, posted to
3008
+ * the shell by its first change: gobj_post_event() delivers it on
3009
+ * the next turn, through the machine -- a deferral, not a time.
3010
+ ************************************************************/
3011
+ function announce_badge(gobj, name_key, text, source) {
3012
+ let priv = gobj.priv;
3013
+ if (gobj_is_destroying(gobj)) return;
3014
+ if (!priv.badge_status) {
2971
3015
  log_error(`C_YUI_SHELL: no live region to say badge '${name_key}': ${text}`);
2972
3016
  return;
2973
3017
  }
@@ -2976,10 +3020,60 @@ function announce_badge(gobj, name_key, text) {
2976
3020
  const tr = priv.translator;
2977
3021
  message = tr("{{name}}, {{n}}", {
2978
3022
  name: tr(name_key),
2979
- n: text
3023
+ n: text,
3024
+ interpolation: { escapeValue: false }
2980
3025
  });
2981
3026
  } else message = `${name_key}, ${text}`;
2982
- $status.textContent = message;
3027
+ let news = priv.badge_news.find((n) => n.source === source);
3028
+ if (news) news.message = message;
3029
+ else priv.badge_news.push({
3030
+ source,
3031
+ message
3032
+ });
3033
+ write_badge_news(gobj);
3034
+ if (priv.badge_news_closing) return;
3035
+ if (gobj_post_event(gobj, "EV_CLOSE_BADGE_NEWS", {}, gobj) < 0) {
3036
+ priv.badge_news = [];
3037
+ return;
3038
+ }
3039
+ priv.badge_news_closing = true;
3040
+ }
3041
+ /************************************************************
3042
+ * A badge whose count went away in the turn it changed: what
3043
+ * this turn said of it is no news any more -- the badge shows
3044
+ * nothing -- and is taken out of the message.
3045
+ ************************************************************/
3046
+ function forget_badge_news(gobj, source) {
3047
+ let priv = gobj.priv;
3048
+ let idx = priv.badge_news.findIndex((n) => n.source === source);
3049
+ if (idx < 0) return;
3050
+ priv.badge_news.splice(idx, 1);
3051
+ write_badge_news(gobj);
3052
+ }
3053
+ /************************************************************
3054
+ * The live region holds the message of this turn: a line per
3055
+ * change, so a reader separates them without a punctuation of
3056
+ * ours, and two controls of one name with one count say it once.
3057
+ *
3058
+ * Written whole, and with new nodes, even when it reads the same:
3059
+ * the callers filter what is no news, and a count that went away
3060
+ * and came back IS news -- a new text node is a change a reader
3061
+ * announces.
3062
+ ************************************************************/
3063
+ function write_badge_news(gobj) {
3064
+ let priv = gobj.priv;
3065
+ let said = [];
3066
+ let $lines = [];
3067
+ for (let news of priv.badge_news) {
3068
+ if (said.includes(news.message)) continue;
3069
+ said.push(news.message);
3070
+ $lines.push(createElement2([
3071
+ "div",
3072
+ { class: "SHELL_BADGE_NEWS" },
3073
+ text_node(news.message)
3074
+ ]));
3075
+ }
3076
+ priv.badge_status.replaceChildren(...$lines);
2983
3077
  }
2984
3078
  /************************************************************
2985
3079
  * A shell was built (mt_create) or is being destroyed
@@ -3052,6 +3146,19 @@ function ac_back_wait_timeout(gobj, event, kw, src) {
3052
3146
  return 0;
3053
3147
  }
3054
3148
  /************************************************************
3149
+ * The turn in which badges changed is over (posted by the first
3150
+ * change, announce_badge()): the message in the live region is
3151
+ * complete, and a reader hears it as it stands. The next change
3152
+ * starts a message of its own -- added to this one, it would say
3153
+ * again what was already said.
3154
+ ************************************************************/
3155
+ function ac_close_badge_news(gobj, event, kw, src) {
3156
+ let priv = gobj.priv;
3157
+ priv.badge_news = [];
3158
+ priv.badge_news_closing = false;
3159
+ return 0;
3160
+ }
3161
+ /************************************************************
3055
3162
  * Drawer backdrop click on a C_YUI_NAV child: the nav publishes
3056
3163
  * this so the shell can close the drawer through the canonical
3057
3164
  * flow (DOM + focus-trap + escape-stack pop) instead of mutating
@@ -3129,12 +3236,18 @@ function create_gclass$22(gclass_name) {
3129
3236
  "EV_BACK_WAIT_TIMEOUT",
3130
3237
  ac_back_wait_timeout,
3131
3238
  null
3239
+ ],
3240
+ [
3241
+ "EV_CLOSE_BADGE_NEWS",
3242
+ ac_close_badge_news,
3243
+ null
3132
3244
  ]
3133
3245
  ]]];
3134
3246
  const event_types = [
3135
3247
  ["EV_NAV_CLICKED", 0],
3136
3248
  ["EV_DRAWER_CLOSE_REQUESTED", 0],
3137
3249
  ["EV_BACK_WAIT_TIMEOUT", 0],
3250
+ ["EV_CLOSE_BADGE_NEWS", 0],
3138
3251
  ["EV_NAV_ITEM_CLOSE", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_PUBLIC_EVENT | event_flag_t.EVF_NO_WARN_SUBS],
3139
3252
  ["EV_ROUTE_REQUESTED", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_PUBLIC_EVENT | event_flag_t.EVF_NO_WARN_SUBS],
3140
3253
  ["EV_ROUTE_CHANGED", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_PUBLIC_EVENT | event_flag_t.EVF_NO_WARN_SUBS],
@@ -3260,9 +3373,9 @@ function yui_shell_previous_route(shell_gobj) {
3260
3373
  /************************************************************
3261
3374
  * Resolve the shell that governs `gobj`: the nearest
3262
3375
  * C_YUI_SHELL ancestor, else the last shell created on the
3263
- * page (apps have exactly one). Null when no shell exists —
3264
- * callers must degrade loudly (shell_modals logs a warning
3265
- * and resolves the safe default).
3376
+ * page that is still alive (apps have exactly one). Null when
3377
+ * no shell exists — callers must degrade loudly (shell_modals
3378
+ * logs a warning and resolves the safe default).
3266
3379
  ************************************************************/
3267
3380
  function yui_shell_of(gobj) {
3268
3381
  let g = gobj;
@@ -3270,7 +3383,7 @@ function yui_shell_of(gobj) {
3270
3383
  if (gobj_gclass_name(g) === GCLASS_NAME$22) return g;
3271
3384
  g = gobj_parent(g);
3272
3385
  }
3273
- return __last_shell__;
3386
+ return __live_shells__.length > 0 ? __live_shells__[__live_shells__.length - 1] : null;
3274
3387
  }
3275
3388
  /************************************************************
3276
3389
  * The DOM where a C_YUI_WINDOW lives when its host names no
@@ -3608,8 +3721,8 @@ function yui_shell_set_toolbar_item_badge(shell_gobj, item_id, value, tone) {
3608
3721
  let now = badge_text(value);
3609
3722
  if (now && now !== before) {
3610
3723
  let $item = $badge.closest("[data-toolbar-item-id]");
3611
- announce_badge(shell_gobj, $item && $item.getAttribute("data-i18n-aria-label") || item_id, now);
3612
- }
3724
+ announce_badge(shell_gobj, $item && $item.getAttribute("data-i18n-aria-label") || item_id, now, `toolbar:${item_id}`);
3725
+ } else if (!now) forget_badge_news(shell_gobj, `toolbar:${item_id}`);
3613
3726
  }
3614
3727
  /************************************************************
3615
3728
  * Set (or clear) the badge of a MENU item — the twin of
@@ -3658,7 +3771,8 @@ function yui_shell_set_nav_item_badge(shell_gobj, item_id, value, tone) {
3658
3771
  badge_tone: tone
3659
3772
  }, shell_gobj);
3660
3773
  let now = badge_text(badge);
3661
- if (now && now !== before) announce_badge(shell_gobj, item.name || item_id, now);
3774
+ if (now && now !== before) announce_badge(shell_gobj, item.name || item.aria_label || item_id, now, `nav:${item_id}`);
3775
+ else if (!now) forget_badge_news(shell_gobj, `nav:${item_id}`);
3662
3776
  }
3663
3777
  /************************************************************
3664
3778
  * Programmatic close of any open toolbar dropdown. Useful for
@@ -3974,7 +4088,19 @@ function yui_shell_show_modal(shell, content, opts) {
3974
4088
  allow = true;
3975
4089
  }
3976
4090
  if (allow && typeof allow.then === "function") {
3977
- if (typeof on_veto === "function") allow.then(on_veto, on_veto);
4091
+ let vetoed = function() {
4092
+ if (typeof on_veto === "function") on_veto();
4093
+ };
4094
+ allow.then(function(answer) {
4095
+ if (answer === true) {
4096
+ do_close();
4097
+ return;
4098
+ }
4099
+ vetoed();
4100
+ }, function(e) {
4101
+ log_warning(`yui_shell_show_modal: before_close rejected: ${e}`);
4102
+ vetoed();
4103
+ });
3978
4104
  return;
3979
4105
  }
3980
4106
  if (allow === false) {
@@ -5576,12 +5702,12 @@ function apply_placement(gobj) {
5576
5702
  * and it covered a toast where they met.
5577
5703
  *
5578
5704
  * The popup layer, not the window layer: the dock has to stay
5579
- * above EVERY window, and windows live in two layers -- the
5580
- * window layer (no `$parent`) and the popup layer, where the
5581
- * site map and the JSON windows of the treedb views put theirs.
5582
- * Above both; below the dialogs, the toasts and the loading
5583
- * cover. No shell (before the first, between a logout and the
5584
- * next login): the body.
5705
+ * above EVERY window, and the windows live in the window layer
5706
+ * -- since 7.26.35 the site map and the JSON windows of the
5707
+ * treedb views too, which put theirs in the popup layer until
5708
+ * then. The popup layer is above it; below the dialogs, the
5709
+ * toasts and the loading cover. No shell (before the first,
5710
+ * between a logout and the next login): the body.
5585
5711
  ************************************************************/
5586
5712
  function dock_place(gobj) {
5587
5713
  return yui_shell_popup_layer(yui_shell_of(gobj)) || document.body;
@@ -15021,7 +15147,7 @@ function g6_event_kw(evt) {
15021
15147
  * g6_canvas_tab_order.js
15022
15148
  *
15023
15149
  * The canvases of a G6 graph in the page's Tab order: the main
15024
- * one in its place, the other layers out of it.
15150
+ * one in its place, and NAMED; the other layers out of it.
15025
15151
  *
15026
15152
  * G6 stacks four canvases (background, main, label, transient)
15027
15153
  * and gives each of them `tabIndex = 1` (configCanvasDom, when it
@@ -15034,6 +15160,24 @@ function g6_event_kw(evt) {
15034
15160
  * to the graph's toolbars and buttons in DOM order; the other
15035
15161
  * layers receive nothing (`pointer-events: none`) and take -1.
15036
15162
  *
15163
+ * A canvas in the Tab order is a control, and a control has a
15164
+ * name: the main canvas carries a `title` and an `aria-label`,
15165
+ * through t() and each with its key, that say WHICH graph it is
15166
+ * -- the key is the view's, one per gclass ("json graph",
15167
+ * "schema graph"...). From 7.26.28 to 7.26.41 Tab landed on it
15168
+ * and a reader announced nothing. The keys are what a language
15169
+ * switch reaches (refresh_language()), as on any control. It is
15170
+ * a `region`, as maplibre makes its own canvas: a name on an
15171
+ * element with no role is one ARIA forbids, and a reader is not
15172
+ * bound to say it.
15173
+ *
15174
+ * And it can be SEEN when it has the focus: G6 writes `outline:
15175
+ * none` on its canvases, inline, so a keyboard that Tabbed onto
15176
+ * the graph had no sign of where it was. The main canvas takes
15177
+ * the `G6_MAIN_CANVAS` class, and g6_canvas_tab_order.css --
15178
+ * imported here, so it comes with the module to every view --
15179
+ * draws a ring on it at `:focus-visible`.
15180
+ *
15037
15181
  * Every view that creates a G6 Graph calls
15038
15182
  * keep_canvas_tab_order() right after `new Graph()`: the order is
15039
15183
  * put right each time G6 writes the 1 -- once the canvas is built
@@ -15046,10 +15190,11 @@ function g6_event_kw(evt) {
15046
15190
  * All Rights Reserved.
15047
15191
  ***********************************************************************/
15048
15192
  /************************************************************
15049
- * Main canvas 0, every other layer -1. Returns 0, or -1 with
15050
- * the cause logged.
15193
+ * Main canvas 0, named by `name_key`, and marked for its
15194
+ * focus ring; every other layer -1. Returns 0, or -1 with the
15195
+ * cause logged.
15051
15196
  ************************************************************/
15052
- function set_canvas_tab_order(gobj, graph) {
15197
+ function set_canvas_tab_order(gobj, graph, name_key) {
15053
15198
  let canvas = graph ? graph.getCanvas() : null;
15054
15199
  if (!canvas || typeof canvas.getLayers !== "function") {
15055
15200
  log_error(`${gobj_short_name(gobj)}: no canvas to set the Tab order of`);
@@ -15069,17 +15214,27 @@ function set_canvas_tab_order(gobj, graph) {
15069
15214
  ret = -1;
15070
15215
  continue;
15071
15216
  }
15072
- $el.tabIndex = name === "main" ? 0 : -1;
15217
+ if (name !== "main") {
15218
+ $el.tabIndex = -1;
15219
+ continue;
15220
+ }
15221
+ $el.tabIndex = 0;
15222
+ $el.classList.add("G6_MAIN_CANVAS");
15223
+ $el.setAttribute("role", "region");
15224
+ $el.setAttribute("title", t(name_key));
15225
+ $el.setAttribute("data-i18n-title", name_key);
15226
+ $el.setAttribute("aria-label", t(name_key));
15227
+ $el.setAttribute("data-i18n-aria-label", name_key);
15073
15228
  }
15074
15229
  return ret;
15075
15230
  }
15076
15231
  /************************************************************
15077
- * Keep the order for the life of `graph`: on every moment G6
15078
- * writes its own.
15232
+ * Keep the order, and the name, for the life of `graph`: on
15233
+ * every moment G6 writes its own.
15079
15234
  ************************************************************/
15080
- function keep_canvas_tab_order(gobj, graph) {
15235
+ function keep_canvas_tab_order(gobj, graph, name_key) {
15081
15236
  for (let ev of [GraphEvent.AFTER_CANVAS_INIT, GraphEvent.AFTER_RENDERER_CHANGE]) graph.on(ev, () => {
15082
- set_canvas_tab_order(gobj, graph);
15237
+ set_canvas_tab_order(gobj, graph, name_key);
15083
15238
  });
15084
15239
  }
15085
15240
  //#endregion
@@ -15588,7 +15743,7 @@ function build_graph$4(gobj) {
15588
15743
  behaviors: BEHAVIORS_READING$1.slice()
15589
15744
  });
15590
15745
  if (priv.theme) graph.setTheme(priv.theme);
15591
- keep_canvas_tab_order(gobj, graph);
15746
+ keep_canvas_tab_order(gobj, graph, "json graph");
15592
15747
  graph.on(NodeEvent.CLICK, (evt) => {
15593
15748
  gobj_send_event(gobj, "EV_NODE_CLICK", g6_event_kw(evt), gobj);
15594
15749
  });
@@ -19508,7 +19663,7 @@ function build_graph$3(gobj) {
19508
19663
  } catch (e) {
19509
19664
  log_error(`${gobj_short_name(gobj)}: the theme was refused: ${e}`);
19510
19665
  }
19511
- keep_canvas_tab_order(gobj, priv.graph);
19666
+ keep_canvas_tab_order(gobj, priv.graph, "fsm graph");
19512
19667
  priv.graph.on("aftertransform", () => {
19513
19668
  yui_graph_update_zoom(gobj_read_attr(gobj, "$container"), priv.graph);
19514
19669
  });
@@ -22151,6 +22306,17 @@ function close_gclass_view(handle) {
22151
22306
  * lands BEHIND its opener whatever number it is given, and
22152
22307
  * the button reads as one that did nothing.
22153
22308
  *
22309
+ * An opener in the place the shell gives every window -- its
22310
+ * window layer, the body while there is none -- gives the
22311
+ * viewer no `$parent` at all: the viewer takes that place too,
22312
+ * and FOLLOWS the shell with its opener (C_YUI_WINDOW's
22313
+ * ac_shell_changed). Up to 7.26.41 it was handed that element
22314
+ * by name, and a name is a choice its host made: a viewer
22315
+ * opened from the developer window between a logout and the
22316
+ * next login was told "the body", and stayed there after the
22317
+ * login -- above the new shell's dialogs -- while its opener
22318
+ * moved into the shell.
22319
+ *
22154
22320
  * Opened from no window: null -- the window layer of the
22155
22321
  * shell, where every window lives (the legacy '#top-layer'
22156
22322
  * when a page has one). It was the shell's popup layer: above
@@ -22160,7 +22326,11 @@ function window_layer_of(host) {
22160
22326
  let $c = gobj_read_pointer_attr(host, "$container");
22161
22327
  if ($c && typeof $c.closest === "function") {
22162
22328
  let $win = $c.closest(".C_YUI_WINDOW");
22163
- if ($win && $win.parentNode) return $win.parentNode;
22329
+ if ($win && $win.parentNode) {
22330
+ let $shell_place = yui_shell_window_layer(yui_shell_of(host)) || document.body;
22331
+ if ($win.parentNode === $shell_place) return null;
22332
+ return $win.parentNode;
22333
+ }
22164
22334
  }
22165
22335
  return typeof document !== "undefined" && document.getElementById("top-layer") || null;
22166
22336
  }
@@ -23021,7 +23191,7 @@ function build_graph$2(gobj) {
23021
23191
  behaviors: BEHAVIORS_READING.slice()
23022
23192
  });
23023
23193
  if (priv.theme) graph.setTheme(priv.theme);
23024
- keep_canvas_tab_order(gobj, graph);
23194
+ keep_canvas_tab_order(gobj, graph, "gobj tree graph");
23025
23195
  graph.on("aftertransform", () => {
23026
23196
  yui_graph_update_zoom(gobj_read_attr(gobj, "$container"), priv.graph);
23027
23197
  let z = priv.last_zoom;
@@ -24609,16 +24779,17 @@ function card_descriptor(it, show_label, badge_of) {
24609
24779
  text_node(label)
24610
24780
  ]);
24611
24781
  if (badge && !pinned) children.push(badge);
24782
+ let name_key = label || it.aria_label || it.id || "";
24612
24783
  let a_attrs = {
24613
24784
  class: "yui-nav-item yui-nav-card",
24614
24785
  href: it.route ? "#" + it.route : "#",
24615
24786
  "data-item-id": it.id,
24616
24787
  "data-route": it.route || "",
24617
24788
  "data-disabled": it.disabled ? "1" : "0",
24618
- "aria-label": label || it.id
24789
+ "aria-label": name_key
24619
24790
  };
24620
- if (label) a_attrs["data-i18n-aria-label"] = label;
24621
- let tip = it.tooltip || it.aria_label || label;
24791
+ if (name_key) a_attrs["data-i18n-aria-label"] = name_key;
24792
+ let tip = it.tooltip || it.aria_label || name_key;
24622
24793
  if (tip) {
24623
24794
  a_attrs.title = tip;
24624
24795
  a_attrs["data-i18n-title"] = tip;
@@ -25017,15 +25188,15 @@ function render_tabs(gobj, items) {
25017
25188
  "aria-hidden": "true"
25018
25189
  }]
25019
25190
  ]);
25020
- let label = it.name || "";
25191
+ let name_key = it.name || it.aria_label || it.id || "";
25021
25192
  let a_attrs = {
25022
25193
  href: it.route ? "#" + it.route : "#",
25023
25194
  "data-item-id": it.id,
25024
25195
  "data-route": it.route || "",
25025
- "aria-label": label || it.id
25196
+ "aria-label": name_key
25026
25197
  };
25027
- if (label) a_attrs["data-i18n-aria-label"] = label;
25028
- let tip = it.tooltip || it.aria_label || label;
25198
+ if (name_key) a_attrs["data-i18n-aria-label"] = name_key;
25199
+ let tip = it.tooltip || it.aria_label || name_key;
25029
25200
  if (tip) {
25030
25201
  a_attrs.title = tip;
25031
25202
  a_attrs["data-i18n-title"] = tip;
@@ -25105,16 +25276,17 @@ function render_breadcrumb(gobj, items) {
25105
25276
  text_node(label)
25106
25277
  ]);
25107
25278
  }
25279
+ let name_key = it.name || it.aria_label || it.id || "";
25108
25280
  let a_attrs = {
25109
25281
  class: "yui-nav-item yui-nav-crumb",
25110
25282
  href: it.route ? "#" + it.route : "#",
25111
25283
  "data-item-id": it.id,
25112
25284
  "data-route": it.route || "",
25113
25285
  "data-disabled": it.disabled ? "1" : "0",
25114
- "aria-label": it.name || it.id
25286
+ "aria-label": name_key
25115
25287
  };
25116
- if (it.name) a_attrs["data-i18n-aria-label"] = it.name;
25117
- let tip = it.tooltip || it.aria_label || it.name;
25288
+ if (name_key) a_attrs["data-i18n-aria-label"] = name_key;
25289
+ let tip = it.tooltip || it.aria_label || name_key;
25118
25290
  if (tip) {
25119
25291
  a_attrs.title = tip;
25120
25292
  a_attrs["data-i18n-title"] = tip;
@@ -25251,12 +25423,14 @@ function render_accordion(gobj, items) {
25251
25423
  "aria-controls": body_id
25252
25424
  };
25253
25425
  let head_badge = item_badge_node(gobj, it, false);
25254
- if (!empty_string(head_text)) {
25255
- head_attrs.i18n = head_text;
25256
- head_attrs.title = head_text;
25257
- head_attrs["data-i18n-title"] = head_text;
25258
- head_attrs["aria-label"] = head_text;
25259
- head_attrs["data-i18n-aria-label"] = head_text;
25426
+ if (!empty_string(head_text)) head_attrs.i18n = head_text;
25427
+ let name_key = it.name || it.aria_label || it.id || "";
25428
+ if (!empty_string(name_key)) {
25429
+ let tip = it.tooltip || it.aria_label || name_key;
25430
+ head_attrs.title = tip;
25431
+ head_attrs["data-i18n-title"] = tip;
25432
+ head_attrs["aria-label"] = name_key;
25433
+ head_attrs["data-i18n-aria-label"] = name_key;
25260
25434
  name_control_with_badge(head_attrs, head_badge);
25261
25435
  }
25262
25436
  let $hdr = createElement2([
@@ -25332,17 +25506,17 @@ function item_li(gobj, it, opts) {
25332
25506
  if (label_el) children.push(label_el);
25333
25507
  if (!pinned) children.push(badge_el);
25334
25508
  }
25335
- let aria_key = label || it.id;
25509
+ let name_key = it.name || it.aria_label || it.id || "";
25336
25510
  let a_attrs = {
25337
25511
  class: a_class,
25338
25512
  href: it.route ? "#" + it.route : "#",
25339
25513
  "data-item-id": it.id,
25340
25514
  "data-route": it.route || "",
25341
25515
  "data-disabled": it.disabled ? "1" : "0",
25342
- "aria-label": aria_key
25516
+ "aria-label": name_key
25343
25517
  };
25344
- if (label) a_attrs["data-i18n-aria-label"] = label;
25345
- let tip = it.tooltip || it.aria_label || label;
25518
+ if (name_key) a_attrs["data-i18n-aria-label"] = name_key;
25519
+ let tip = it.tooltip || it.aria_label || name_key;
25346
25520
  if (tip) {
25347
25521
  a_attrs.title = tip;
25348
25522
  a_attrs["data-i18n-title"] = tip;
@@ -25385,15 +25559,16 @@ function item_iconbar(gobj, it, opts) {
25385
25559
  if (label_el) children.push(label_el);
25386
25560
  }
25387
25561
  if (!pinned) children.push(badge_el);
25562
+ let name_key = it.name || it.aria_label || it.id || "";
25388
25563
  let a_attrs = {
25389
25564
  class: "yui-nav-item yui-nav-stacked",
25390
25565
  href: it.route ? "#" + it.route : "#",
25391
25566
  "data-item-id": it.id,
25392
25567
  "data-route": it.route || "",
25393
- "aria-label": label || it.id
25568
+ "aria-label": name_key
25394
25569
  };
25395
- if (label) a_attrs["data-i18n-aria-label"] = label;
25396
- let tip = it.tooltip || it.aria_label || label;
25570
+ if (name_key) a_attrs["data-i18n-aria-label"] = name_key;
25571
+ let tip = it.tooltip || it.aria_label || name_key;
25397
25572
  if (tip) {
25398
25573
  a_attrs.title = tip;
25399
25574
  a_attrs["data-i18n-title"] = tip;
@@ -25661,7 +25836,12 @@ function render_node(node) {
25661
25836
  "aria-hidden": "true"
25662
25837
  }]]
25663
25838
  ]);
25664
- row.push([
25839
+ if (node.label && node.data_label) row.push([
25840
+ "span",
25841
+ { class: "ROUTEMAP_NAME" },
25842
+ text_node(node.label)
25843
+ ]);
25844
+ else if (node.label) row.push([
25665
25845
  "span",
25666
25846
  {
25667
25847
  class: "ROUTEMAP_NAME",
@@ -25714,10 +25894,10 @@ function render_node(node) {
25714
25894
  href: "#" + node.route,
25715
25895
  title: node.route
25716
25896
  };
25717
- if (node.label) {
25897
+ if (node.label && !node.data_label) {
25718
25898
  a_attrs["aria-label"] = node.label;
25719
25899
  a_attrs["data-i18n-aria-label"] = node.label;
25720
- }
25900
+ } else a_attrs["aria-label"] = node.label || node.route;
25721
25901
  if (node.current) a_attrs["aria-current"] = "page";
25722
25902
  $row = createElement2([
25723
25903
  "a",
@@ -62878,7 +63058,7 @@ function build_graph$1(gobj) {
62878
63058
  plugins: []
62879
63059
  });
62880
63060
  graph.setTheme(priv.theme);
62881
- keep_canvas_tab_order(gobj, graph);
63061
+ keep_canvas_tab_order(gobj, graph, "treedb graph");
62882
63062
  priv._unforward_wheel = yui_graph_forward_wheel(graph, priv.$container, { selector: ".TREEDB_CARD, .TREEDB_PILLS" });
62883
63063
  graph.setLayout(layout);
62884
63064
  priv.graph_rendered = false;
@@ -74567,7 +74747,7 @@ function build_graph(gobj) {
74567
74747
  }
74568
74748
  priv.graph = graph;
74569
74749
  graph.setTheme(dark ? "dark" : "light");
74570
- keep_canvas_tab_order(gobj, graph);
74750
+ keep_canvas_tab_order(gobj, graph, "schema graph");
74571
74751
  graph.on("aftertransform", () => {
74572
74752
  yui_graph_update_zoom($container, priv.graph);
74573
74753
  });
@@ -76682,6 +76862,7 @@ var PRIVATE_DATA$1 = {
76682
76862
  export_view: null
76683
76863
  };
76684
76864
  var __gclass__$1 = null;
76865
+ var __described_seq__ = 0;
76685
76866
  /******************************
76686
76867
  * Framework Methods
76687
76868
  ******************************/
@@ -77482,6 +77663,15 @@ function render(gobj) {
77482
77663
  * A card that opens something, with its own logical name. The
77483
77664
  * cards grid is the shell's, so a schema card and a nav card
77484
77665
  * look alike on purpose.
77666
+ *
77667
+ * `title` is the card's name: `{i18n: key}`, or `{text: data}` for
77668
+ * a name no locale holds (a treedb's id). The card is a control --
77669
+ * a role=button that Enter and Space press -- and a control is
77670
+ * NAMED: a title and an aria-label, with their keys when the name
77671
+ * is one, and its tags (the counts) as its description, which an
77672
+ * aria-label alone would hide from a reader. Up to 7.26.41 it had
77673
+ * neither, and the orphans card was handed its name translated,
77674
+ * in the language it was drawn in for good.
77485
77675
  ***************************************************************/
77486
77676
  function open_card(gobj, logical, title, icon, tags, event, kw) {
77487
77677
  let $tags = tags.map((tag) => {
@@ -77499,13 +77689,36 @@ function open_card(gobj, logical, title, icon, tags, event, kw) {
77499
77689
  ]] : `${tag.text}`
77500
77690
  ];
77501
77691
  });
77692
+ let tags_id = `yui-schema-described-${++__described_seq__}`;
77693
+ let card_attrs = {
77694
+ class: `${logical} yui-nav-card card`,
77695
+ role: "button",
77696
+ tabindex: "0",
77697
+ "aria-describedby": tags_id
77698
+ };
77699
+ let $name;
77700
+ if (title.i18n) {
77701
+ Object.assign(card_attrs, name_attrs(title.i18n, {}));
77702
+ $name = [
77703
+ "span",
77704
+ {
77705
+ class: `${logical}_NAME has-text-weight-semibold`,
77706
+ i18n: title.i18n
77707
+ },
77708
+ t(title.i18n)
77709
+ ];
77710
+ } else {
77711
+ card_attrs.title = String(title.text);
77712
+ card_attrs["aria-label"] = String(title.text);
77713
+ $name = [
77714
+ "span",
77715
+ { class: `${logical}_NAME has-text-weight-semibold` },
77716
+ text_node(title.text)
77717
+ ];
77718
+ }
77502
77719
  return [
77503
77720
  "div",
77504
- {
77505
- class: `${logical} yui-nav-card card`,
77506
- role: "button",
77507
- tabindex: "0"
77508
- },
77721
+ card_attrs,
77509
77722
  [[
77510
77723
  "div",
77511
77724
  { class: `${logical}_BODY card-content p-3` },
@@ -77518,16 +77731,16 @@ function open_card(gobj, logical, title, icon, tags, event, kw) {
77518
77731
  [[
77519
77732
  "span",
77520
77733
  { class: "icon" },
77521
- [["i", { class: icon }]]
77522
- ], [
77523
- "span",
77524
- { class: `${logical}_NAME has-text-weight-semibold` },
77525
- text_node(title)
77526
- ]]
77734
+ [["i", {
77735
+ class: icon,
77736
+ "aria-hidden": "true"
77737
+ }]]
77738
+ ], $name]
77527
77739
  ], [
77528
77740
  "div",
77529
77741
  {
77530
77742
  class: `${logical}_TAGS tags mt-2`,
77743
+ id: tags_id,
77531
77744
  style: "gap:.25rem;"
77532
77745
  },
77533
77746
  $tags
@@ -77575,9 +77788,9 @@ function render_treedbs(gobj, $body) {
77575
77788
  style: "is-warning is-light"
77576
77789
  }] : []
77577
77790
  ];
77578
- $cards.push(open_card(gobj, "SCHEMA_TREEDB_CARD", treedb.id, "yi-database", tags, "EV_SELECT_TREEDB", { treedb: treedb.id }));
77791
+ $cards.push(open_card(gobj, "SCHEMA_TREEDB_CARD", { text: treedb.id }, "yi-database", tags, "EV_SELECT_TREEDB", { treedb: treedb.id }));
77579
77792
  }
77580
- if (priv.model.orphan_topics.length > 0 || priv.model.orphan_cols.length > 0) $cards.push(open_card(gobj, "SCHEMA_ORPHAN_CARD", t("orphans"), "yi-triangle-exclamation", [{
77793
+ if (priv.model.orphan_topics.length > 0 || priv.model.orphan_cols.length > 0) $cards.push(open_card(gobj, "SCHEMA_ORPHAN_CARD", { i18n: "orphans" }, "yi-triangle-exclamation", [{
77581
77794
  i18n: "topics",
77582
77795
  text: priv.model.orphan_topics.length
77583
77796
  }, {
@@ -77618,22 +77831,33 @@ function render_topics(gobj, $body) {
77618
77831
  $actions.push(row_icon(gobj, "SCHEMA_TOPIC_EDIT", "yi-pen", "edit topic", "EV_EDIT_TOPIC", { topic: address }));
77619
77832
  $actions.push(row_icon(gobj, "SCHEMA_TOPIC_DELETE", "yi-trash", "delete topic", "EV_DELETE_TOPIC", { topic: address }));
77620
77833
  }
77834
+ let open_attrs = {
77835
+ class: "SCHEMA_TOPIC_OPEN has-text-weight-semibold",
77836
+ type: "button",
77837
+ title: topic.name,
77838
+ "aria-label": topic.name
77839
+ };
77840
+ let id_attrs = { class: "SCHEMA_TOPIC_ID is-size-7 yui-text-quiet" };
77841
+ if (ambiguous) {
77842
+ id_attrs.id = `yui-schema-described-${++__described_seq__}`;
77843
+ open_attrs["aria-describedby"] = id_attrs.id;
77844
+ }
77621
77845
  $rows.push([
77622
77846
  "tr",
77623
- {
77624
- class: "SCHEMA_TOPIC_ROW",
77625
- role: "button",
77626
- tabindex: "0"
77627
- },
77847
+ { class: "SCHEMA_TOPIC_ROW" },
77628
77848
  [
77629
77849
  [
77630
77850
  "td",
77631
77851
  { class: "SCHEMA_TOPIC_NAME" },
77632
77852
  [
77633
77853
  [
77634
- "span",
77635
- { class: "has-text-weight-semibold" },
77636
- text_node(topic.name)
77854
+ "button",
77855
+ open_attrs,
77856
+ text_node(topic.name),
77857
+ { click: (evt) => {
77858
+ evt.stopPropagation();
77859
+ gobj_send_event(gobj, "EV_SELECT_TOPIC", { topic: address }, gobj);
77860
+ } }
77637
77861
  ],
77638
77862
  topic.system_topic ? [
77639
77863
  "span",
@@ -77663,7 +77887,7 @@ function render_topics(gobj, $body) {
77663
77887
  ],
77664
77888
  ambiguous ? [
77665
77889
  "div",
77666
- { class: "SCHEMA_TOPIC_ID is-size-7 yui-text-quiet" },
77890
+ id_attrs,
77667
77891
  [[
77668
77892
  "code",
77669
77893
  {},
@@ -77705,17 +77929,10 @@ function render_topics(gobj, $body) {
77705
77929
  $actions
77706
77930
  ]
77707
77931
  ],
77708
- {
77709
- click: (evt) => {
77710
- if (evt.target.closest(".SCHEMA_TOPIC_ACTIONS")) return;
77711
- gobj_send_event(gobj, "EV_SELECT_TOPIC", { topic: address }, gobj);
77712
- },
77713
- keydown: (evt) => {
77714
- if (evt.key !== "Enter" && evt.key !== " ") return;
77715
- evt.preventDefault();
77716
- gobj_send_event(gobj, "EV_SELECT_TOPIC", { topic: address }, gobj);
77717
- }
77718
- }
77932
+ { click: (evt) => {
77933
+ if (evt.target.closest(".SCHEMA_TOPIC_ACTIONS")) return;
77934
+ gobj_send_event(gobj, "EV_SELECT_TOPIC", { topic: address }, gobj);
77935
+ } }
77719
77936
  ]);
77720
77937
  }
77721
77938
  let $table = createElement2([