@yuneta/gobj-ui 7.23.116 → 7.23.117

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.
@@ -62722,6 +62722,14 @@ function make_toolbar(gobj) {
62722
62722
  let priv = gobj.priv;
62723
62723
  let modes = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "operation_modes");
62724
62724
  if ((0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "readonly")) modes = modes.filter((mode) => mode !== "edition");
62725
+ let mode_options = modes.map((item) => [
62726
+ "option",
62727
+ {
62728
+ value: item,
62729
+ "data-i18n": item
62730
+ },
62731
+ option_label(item)
62732
+ ]);
62725
62733
  let left_items = [
62726
62734
  [
62727
62735
  "span",
@@ -62735,7 +62743,13 @@ function make_toolbar(gobj) {
62735
62743
  [
62736
62744
  "div",
62737
62745
  { class: "select" },
62738
- [["select", { class: "GRAPH_LAYOUT_SELECT" }]],
62746
+ [["select", {
62747
+ class: "GRAPH_LAYOUT_SELECT",
62748
+ title: (0, i18next.t)("layout"),
62749
+ "data-i18n-title": "layout",
62750
+ "aria-label": (0, i18next.t)("layout"),
62751
+ "data-i18n-aria-label": "layout"
62752
+ }]],
62739
62753
  { change: (evt) => {
62740
62754
  evt.stopPropagation();
62741
62755
  (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_SET_LAYOUT", { layout: evt.target.value }, gobj);
@@ -62755,15 +62769,14 @@ function make_toolbar(gobj) {
62755
62769
  { class: "select" },
62756
62770
  [[
62757
62771
  "select",
62758
- { class: "GRAPH_MODE_SELECT" },
62759
- modes.map((item) => [
62760
- "option",
62761
- {
62762
- value: item,
62763
- "data-i18n": item
62764
- },
62765
- option_label(item)
62766
- ])
62772
+ {
62773
+ class: "GRAPH_MODE_SELECT",
62774
+ title: (0, i18next.t)("operation mode"),
62775
+ "data-i18n-title": "operation mode",
62776
+ "aria-label": (0, i18next.t)("operation mode"),
62777
+ "data-i18n-aria-label": "operation mode"
62778
+ },
62779
+ mode_options
62767
62780
  ]],
62768
62781
  { change: (evt) => {
62769
62782
  evt.stopPropagation();
@@ -62717,6 +62717,14 @@ function make_toolbar(gobj) {
62717
62717
  let priv = gobj.priv;
62718
62718
  let modes = gobj_read_attr(gobj, "operation_modes");
62719
62719
  if (gobj_read_bool_attr(gobj, "readonly")) modes = modes.filter((mode) => mode !== "edition");
62720
+ let mode_options = modes.map((item) => [
62721
+ "option",
62722
+ {
62723
+ value: item,
62724
+ "data-i18n": item
62725
+ },
62726
+ option_label(item)
62727
+ ]);
62720
62728
  let left_items = [
62721
62729
  [
62722
62730
  "span",
@@ -62730,7 +62738,13 @@ function make_toolbar(gobj) {
62730
62738
  [
62731
62739
  "div",
62732
62740
  { class: "select" },
62733
- [["select", { class: "GRAPH_LAYOUT_SELECT" }]],
62741
+ [["select", {
62742
+ class: "GRAPH_LAYOUT_SELECT",
62743
+ title: t("layout"),
62744
+ "data-i18n-title": "layout",
62745
+ "aria-label": t("layout"),
62746
+ "data-i18n-aria-label": "layout"
62747
+ }]],
62734
62748
  { change: (evt) => {
62735
62749
  evt.stopPropagation();
62736
62750
  gobj_send_event(gobj, "EV_SET_LAYOUT", { layout: evt.target.value }, gobj);
@@ -62750,15 +62764,14 @@ function make_toolbar(gobj) {
62750
62764
  { class: "select" },
62751
62765
  [[
62752
62766
  "select",
62753
- { class: "GRAPH_MODE_SELECT" },
62754
- modes.map((item) => [
62755
- "option",
62756
- {
62757
- value: item,
62758
- "data-i18n": item
62759
- },
62760
- option_label(item)
62761
- ])
62767
+ {
62768
+ class: "GRAPH_MODE_SELECT",
62769
+ title: t("operation mode"),
62770
+ "data-i18n-title": "operation mode",
62771
+ "aria-label": t("operation mode"),
62772
+ "data-i18n-aria-label": "operation mode"
62773
+ },
62774
+ mode_options
62762
62775
  ]],
62763
62776
  { change: (evt) => {
62764
62777
  evt.stopPropagation();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "7.23.116",
3
+ "version": "7.23.117",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
@@ -699,9 +699,17 @@ function make_toolbar(gobj)
699
699
  * via populate_nodes_tree_options()
700
700
  */
701
701
  let left_items = [
702
+ /* The rótulo beside a select is a SPAN: it names it for the eye
703
+ * and for nothing else -- and it is `is-hidden-mobile`, so on a
704
+ * phone even the eye loses it and the control says only its
705
+ * current value. The name goes on the select, and a `title`
706
+ * with it, which is what carries the meaning where the label
707
+ * is gone. */
702
708
  ['span', {class: 'GRAPH_LAYOUT_LABEL is-hidden-mobile', style: 'padding-right:5px;', i18n: 'layout'}, 'layout'],
703
709
  ['div', {class: 'select'}, [
704
- ['select', {class: 'GRAPH_LAYOUT_SELECT'}]
710
+ ['select', {class: 'GRAPH_LAYOUT_SELECT',
711
+ title: t('layout'), 'data-i18n-title': 'layout',
712
+ 'aria-label': t('layout'), 'data-i18n-aria-label': 'layout'}]
705
713
  ], {
706
714
  change: (evt) => {
707
715
  evt.stopPropagation();
@@ -711,7 +719,10 @@ function make_toolbar(gobj)
711
719
 
712
720
  ['span', {class: 'GRAPH_MODE_LABEL is-hidden-mobile', style: 'padding-left:10px; padding-right:5px;', i18n: 'operation mode'}, 'operation mode'],
713
721
  ['div', {class: 'select'}, [
714
- ['select', {class: 'GRAPH_MODE_SELECT'}, mode_options]
722
+ ['select', {class: 'GRAPH_MODE_SELECT',
723
+ title: t('operation mode'), 'data-i18n-title': 'operation mode',
724
+ 'aria-label': t('operation mode'),
725
+ 'data-i18n-aria-label': 'operation mode'}, mode_options]
715
726
  ], {
716
727
  change: (evt) => {
717
728
  evt.stopPropagation();