@dloizides/ui-tables 1.11.0 → 1.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,60 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.12.0
4
+
5
+ Accessibility fix: controls that announced a **bare number** now say what they are. Confirmed in
6
+ a real browser, the rows-per-page trigger rendered `aria-label="50"` — a screen-reader user heard
7
+ the value and nothing about the control. Fixed across the whole package, plus two more instances
8
+ of the same defect class found while auditing.
9
+
10
+ ### ⚠️ ACTION REQUIRED — add three translation keys
11
+
12
+ The new accessible names are user-facing strings, so they come from the host app's locale files.
13
+ **Every consuming app must add these three keys:**
14
+
15
+ | Key | Params | Suggested English |
16
+ |---|---|---|
17
+ | `uiTables.pager.rowsTriggerLabel` | `{{p1}}` = current page size | `Rows per page, currently {{p1}}` |
18
+ | `uiTables.pager.rowsOptionLabel` | `{{p1}}` = that option's size | `Show {{p1}} rows per page` |
19
+ | `uiTables.filters.selectTriggerLabel` | `{{p1}}` = field label, `{{p2}}` = selection | `{{p1}}: {{p2}}` |
20
+
21
+ They are exported as `TABLE_I18N.pagerRowsTriggerLabel`, `TABLE_I18N.pagerRowsOptionLabel` and
22
+ `FILTERS_I18N.selectTriggerLabel`, so an app that derives its required-key list from those maps
23
+ (as zygos' guard test does) picks them up automatically.
24
+
25
+ **Upgrading without adding them is safe.** Unlike the usual kit contract — where an undefined key
26
+ renders as its literal dotted name, the failure that put 44 raw keys on screen in zygos — a
27
+ newly-introduced ACCESSIBLE-NAME key degrades to the value it replaced (the bare number, the field
28
+ label). An aria-label is invisible to sighted reviewers, so a raw key there would ship silently and
29
+ hurt only screen-reader users. Until you add the keys you simply keep the old, worse names.
30
+
31
+ ### Fixed
32
+
33
+ - **`Pager` rows-per-page trigger** (`dropdown` variant) — was `aria-label="50"`, now
34
+ "Rows per page, currently 50".
35
+ - **`Pager` rows-per-page options** (`dropdown` variant) — was `aria-label="100"`, now
36
+ "Show 100 rows per page".
37
+ - **`Pager` rows-per-page pills** (the **DEFAULT** `pills` variant) — carried the identical
38
+ bare-number defect and was NOT in the original report, so it affected more consumers than the
39
+ dropdown did. Same fix, same key.
40
+ - **`Filters` select trigger** — `accessibilityLabel` replaces the trigger's visible text for a
41
+ screen reader, so labelling it `field.label` alone silently hid the current selection: sighted
42
+ users saw "Closed", screen-reader users heard only "Status". Now "Status: Closed".
43
+ - **`StatCard`** — its two translation keys were string literals inlined in the component rather
44
+ than members of an exported map, so an app deriving its required-key list from `TABLE_I18N`
45
+ could not see them and would render them raw. Now exported as `TABLE_I18N.statCardLabel` /
46
+ `TABLE_I18N.statHint`. **The key strings are unchanged** (`analytics.statCardLabel`,
47
+ `analytics.statHint`) — renaming them would have broken every app that already defines them.
48
+
49
+ ### Added
50
+
51
+ - **`accessibleName(translated, key, fallback)`** — the internal degradation guard described
52
+ above. Not exported; the kit's fallback-free i18n contract is unchanged for visible copy.
53
+
54
+ Additive and backward compatible for consumers — no public prop changed, so a MINOR bump.
55
+ `SizeDropdown`'s props gained `triggerLabel` / `getOptionLabel`, but that component is internal
56
+ (never exported from the package root).
57
+
3
58
  ## 1.11.0
4
59
 
5
60
  Additive: a **declarative `Filters` bar** + **Pager** enhancements. Every change is additive and
package/README.md CHANGED
@@ -226,6 +226,39 @@ renders exactly as it always has.
226
226
 
227
227
  Colours come entirely from `useUi().theme` (drive it with `@dloizides/design-tokens` via `tokensToUiTheme`), so the grid re-themes per tenant. Every component-authored string is routed through the UiProvider `t` — provide the `uiTables.*` keys (see `TABLE_I18N`) in your locale files; a caller may also pass already-translated `loadingLabel` / `emptyLabel` / `resultsLabel` directly.
228
228
 
229
+ ## ⚠️ New in 1.12.0 — three translation keys every host app must add
230
+
231
+ 1.12.0 gives three controls a real accessible name instead of a bare number. Those names are
232
+ user-facing strings, so they come from **your** locale files. **Add these three keys.**
233
+
234
+ | Key (constant) | Key (string) | Params | Suggested English |
235
+ |---|---|---|---|
236
+ | `TABLE_I18N.pagerRowsTriggerLabel` | `uiTables.pager.rowsTriggerLabel` | `{{p1}}` = current page size | `Rows per page, currently {{p1}}` |
237
+ | `TABLE_I18N.pagerRowsOptionLabel` | `uiTables.pager.rowsOptionLabel` | `{{p1}}` = that option's size | `Show {{p1}} rows per page` |
238
+ | `FILTERS_I18N.selectTriggerLabel` | `uiTables.filters.selectTriggerLabel` | `{{p1}}` = field label, `{{p2}}` = selected option | `{{p1}}: {{p2}}` |
239
+
240
+ Also newly **listed** in `TABLE_I18N` (not new keys — StatCard has always called them, they were
241
+ just inlined in the component where a key-coverage guard could not see them). If your app renders
242
+ `StatCard`, check you actually define them:
243
+
244
+ | Key (constant) | Key (string) | Params |
245
+ |---|---|---|
246
+ | `TABLE_I18N.statCardLabel` | `analytics.statCardLabel` | `{{p1}}` = label, `{{p2}}` = value |
247
+ | `TABLE_I18N.statHint` | `analytics.statHint` | `{{p1}}` = label |
248
+
249
+ **Your app will not visibly break if you skip this.** A key you have not defined degrades to the
250
+ value it replaced (the bare number, the field label alone) rather than to the raw dotted key —
251
+ so upgrading is safe, but until you add the keys your screen-reader users keep the old, worse
252
+ experience. Derive your required-key list from the exported maps rather than hand-maintaining it:
253
+
254
+ ```ts
255
+ import { TABLE_I18N, FILTERS_I18N } from '@dloizides/ui-tables';
256
+
257
+ // Guard test: every key the kit can ask for must exist in your locale file.
258
+ const required = [...Object.values(TABLE_I18N), ...Object.values(FILTERS_I18N)];
259
+ required.forEach((key) => expect(en).toHaveProperty(key));
260
+ ```
261
+
229
262
  ## Install
230
263
 
231
264
  ```bash
@@ -243,8 +276,9 @@ import { StatCard } from '@dloizides/ui-tables';
243
276
  ```
244
277
 
245
278
  Mount a `FeedbackUiProvider` / `UiProvider` (from `@dloizides/ui-feedback`) at your app root so the
246
- component picks up your theme + translations. The injected `t` is called with `analytics.statHint` and
247
- `analytics.statCardLabel` (provide these keys in your locale files).
279
+ component picks up your theme + translations. The injected `t` is called with `TABLE_I18N.statHint`
280
+ (`analytics.statHint`) and `TABLE_I18N.statCardLabel` (`analytics.statCardLabel`) — provide these
281
+ keys in your locale files.
248
282
 
249
283
  ## License
250
284
 
package/dist/index.d.mts CHANGED
@@ -447,6 +447,26 @@ declare const TABLE_I18N: {
447
447
  readonly pagerRowsOptionHint: "uiTables.pager.rowsOptionHint";
448
448
  /** Accessible hint for the dropdown-variant rows-per-page trigger button. */
449
449
  readonly pagerRowsTriggerHint: "uiTables.pager.rowsTriggerHint";
450
+ /**
451
+ * Accessible NAME of the rows-per-page control, e.g. "Rows per page, currently {{p1}}".
452
+ * Without it the control is announced as the bare number ("50"), which says nothing about
453
+ * what it does. Untranslated it degrades to that bare number — never to the raw key.
454
+ */
455
+ readonly pagerRowsTriggerLabel: "uiTables.pager.rowsTriggerLabel";
456
+ /**
457
+ * Accessible NAME of ONE rows-per-page choice, e.g. "Show {{p1}} rows per page". Used by
458
+ * BOTH the `dropdown` options and the default `pills`. Untranslated it degrades to the
459
+ * bare number — never to the raw key.
460
+ */
461
+ readonly pagerRowsOptionLabel: "uiTables.pager.rowsOptionLabel";
462
+ /**
463
+ * StatCard's accessible name, e.g. "{{p1}}: {{p2}}". Note the `analytics.` prefix: these
464
+ * two keys predate this map and were only ever inlined in StatCard.tsx, so apps deriving
465
+ * their required-key list from TABLE_I18N could not see them. Registered here UNCHANGED
466
+ * (renaming them would break every app that already defines them).
467
+ */
468
+ readonly statCardLabel: "analytics.statCardLabel";
469
+ readonly statHint: "analytics.statHint";
450
470
  };
451
471
 
452
472
  /**
@@ -698,6 +718,13 @@ declare const FILTERS_I18N: {
698
718
  readonly selectPlaceholder: "uiTables.filters.selectPlaceholder";
699
719
  readonly dropdownHint: "uiTables.filters.dropdownHint";
700
720
  readonly optionHint: "uiTables.filters.optionHint";
721
+ /**
722
+ * Accessible NAME of a select trigger, e.g. "{{p1}}: {{p2}}" → "Status: Active". The
723
+ * trigger's `accessibilityLabel` REPLACES its visible text for a screen reader, so labelling
724
+ * it with the field name alone silently hides the current selection. Untranslated it
725
+ * degrades to the field label alone (prior behaviour) — never to the raw key.
726
+ */
727
+ readonly selectTriggerLabel: "uiTables.filters.selectTriggerLabel";
701
728
  readonly from: "uiTables.filters.from";
702
729
  readonly to: "uiTables.filters.to";
703
730
  };
package/dist/index.d.ts CHANGED
@@ -447,6 +447,26 @@ declare const TABLE_I18N: {
447
447
  readonly pagerRowsOptionHint: "uiTables.pager.rowsOptionHint";
448
448
  /** Accessible hint for the dropdown-variant rows-per-page trigger button. */
449
449
  readonly pagerRowsTriggerHint: "uiTables.pager.rowsTriggerHint";
450
+ /**
451
+ * Accessible NAME of the rows-per-page control, e.g. "Rows per page, currently {{p1}}".
452
+ * Without it the control is announced as the bare number ("50"), which says nothing about
453
+ * what it does. Untranslated it degrades to that bare number — never to the raw key.
454
+ */
455
+ readonly pagerRowsTriggerLabel: "uiTables.pager.rowsTriggerLabel";
456
+ /**
457
+ * Accessible NAME of ONE rows-per-page choice, e.g. "Show {{p1}} rows per page". Used by
458
+ * BOTH the `dropdown` options and the default `pills`. Untranslated it degrades to the
459
+ * bare number — never to the raw key.
460
+ */
461
+ readonly pagerRowsOptionLabel: "uiTables.pager.rowsOptionLabel";
462
+ /**
463
+ * StatCard's accessible name, e.g. "{{p1}}: {{p2}}". Note the `analytics.` prefix: these
464
+ * two keys predate this map and were only ever inlined in StatCard.tsx, so apps deriving
465
+ * their required-key list from TABLE_I18N could not see them. Registered here UNCHANGED
466
+ * (renaming them would break every app that already defines them).
467
+ */
468
+ readonly statCardLabel: "analytics.statCardLabel";
469
+ readonly statHint: "analytics.statHint";
450
470
  };
451
471
 
452
472
  /**
@@ -698,6 +718,13 @@ declare const FILTERS_I18N: {
698
718
  readonly selectPlaceholder: "uiTables.filters.selectPlaceholder";
699
719
  readonly dropdownHint: "uiTables.filters.dropdownHint";
700
720
  readonly optionHint: "uiTables.filters.optionHint";
721
+ /**
722
+ * Accessible NAME of a select trigger, e.g. "{{p1}}: {{p2}}" → "Status: Active". The
723
+ * trigger's `accessibilityLabel` REPLACES its visible text for a screen reader, so labelling
724
+ * it with the field name alone silently hides the current selection. Untranslated it
725
+ * degrades to the field label alone (prior behaviour) — never to the raw key.
726
+ */
727
+ readonly selectTriggerLabel: "uiTables.filters.selectTriggerLabel";
701
728
  readonly from: "uiTables.filters.from";
702
729
  readonly to: "uiTables.filters.to";
703
730
  };
package/dist/index.js CHANGED
@@ -11,48 +11,6 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
11
  var React4__default = /*#__PURE__*/_interopDefault(React4);
12
12
 
13
13
  // src/StatCard/StatCard.tsx
14
- var CARD_PADDING = 16;
15
- var CARD_BORDER_RADIUS = 12;
16
- var CARD_BORDER_WIDTH = 1;
17
- var LABEL_FONT_SIZE = 14;
18
- var VALUE_FONT_SIZE = 28;
19
- var VALUE_LINE_HEIGHT = 36;
20
- var styles = reactNative.StyleSheet.create({
21
- card: {
22
- padding: CARD_PADDING,
23
- borderRadius: CARD_BORDER_RADIUS,
24
- borderWidth: CARD_BORDER_WIDTH
25
- },
26
- label: {
27
- fontSize: LABEL_FONT_SIZE,
28
- fontWeight: "500"
29
- },
30
- value: {
31
- fontSize: VALUE_FONT_SIZE,
32
- fontWeight: "700",
33
- lineHeight: VALUE_LINE_HEIGHT
34
- }
35
- });
36
- var StatCard = React4.memo(({ label, value, testID }) => {
37
- const { theme, t } = uiFeedback.useUi();
38
- const { colors } = theme;
39
- const formattedValue = value.toLocaleString();
40
- return /* @__PURE__ */ jsxRuntime.jsxs(
41
- reactNative.View,
42
- {
43
- accessibilityHint: t("analytics.statHint", label),
44
- accessibilityLabel: t("analytics.statCardLabel", label, formattedValue),
45
- accessibilityRole: "text",
46
- style: [styles.card, { backgroundColor: colors.surface, borderColor: colors.border }],
47
- testID,
48
- children: [
49
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles.label, { color: colors.textSecondary }], children: label }),
50
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles.value, { color: colors.text }], children: formattedValue })
51
- ]
52
- }
53
- );
54
- });
55
- StatCard.displayName = "StatCard";
56
14
 
57
15
  // src/DataTable/constants.ts
58
16
  var CARD_STACK_BREAKPOINT = 640;
@@ -121,8 +79,70 @@ var TABLE_I18N = {
121
79
  pagerRows: "uiTables.pager.rows",
122
80
  pagerRowsOptionHint: "uiTables.pager.rowsOptionHint",
123
81
  /** Accessible hint for the dropdown-variant rows-per-page trigger button. */
124
- pagerRowsTriggerHint: "uiTables.pager.rowsTriggerHint"
82
+ pagerRowsTriggerHint: "uiTables.pager.rowsTriggerHint",
83
+ /**
84
+ * Accessible NAME of the rows-per-page control, e.g. "Rows per page, currently {{p1}}".
85
+ * Without it the control is announced as the bare number ("50"), which says nothing about
86
+ * what it does. Untranslated it degrades to that bare number — never to the raw key.
87
+ */
88
+ pagerRowsTriggerLabel: "uiTables.pager.rowsTriggerLabel",
89
+ /**
90
+ * Accessible NAME of ONE rows-per-page choice, e.g. "Show {{p1}} rows per page". Used by
91
+ * BOTH the `dropdown` options and the default `pills`. Untranslated it degrades to the
92
+ * bare number — never to the raw key.
93
+ */
94
+ pagerRowsOptionLabel: "uiTables.pager.rowsOptionLabel",
95
+ /**
96
+ * StatCard's accessible name, e.g. "{{p1}}: {{p2}}". Note the `analytics.` prefix: these
97
+ * two keys predate this map and were only ever inlined in StatCard.tsx, so apps deriving
98
+ * their required-key list from TABLE_I18N could not see them. Registered here UNCHANGED
99
+ * (renaming them would break every app that already defines them).
100
+ */
101
+ statCardLabel: "analytics.statCardLabel",
102
+ statHint: "analytics.statHint"
125
103
  };
104
+ var CARD_PADDING = 16;
105
+ var CARD_BORDER_RADIUS = 12;
106
+ var CARD_BORDER_WIDTH = 1;
107
+ var LABEL_FONT_SIZE = 14;
108
+ var VALUE_FONT_SIZE = 28;
109
+ var VALUE_LINE_HEIGHT = 36;
110
+ var styles = reactNative.StyleSheet.create({
111
+ card: {
112
+ padding: CARD_PADDING,
113
+ borderRadius: CARD_BORDER_RADIUS,
114
+ borderWidth: CARD_BORDER_WIDTH
115
+ },
116
+ label: {
117
+ fontSize: LABEL_FONT_SIZE,
118
+ fontWeight: "500"
119
+ },
120
+ value: {
121
+ fontSize: VALUE_FONT_SIZE,
122
+ fontWeight: "700",
123
+ lineHeight: VALUE_LINE_HEIGHT
124
+ }
125
+ });
126
+ var StatCard = React4.memo(({ label, value, testID }) => {
127
+ const { theme, t } = uiFeedback.useUi();
128
+ const { colors } = theme;
129
+ const formattedValue = value.toLocaleString();
130
+ return /* @__PURE__ */ jsxRuntime.jsxs(
131
+ reactNative.View,
132
+ {
133
+ accessibilityHint: t(TABLE_I18N.statHint, label),
134
+ accessibilityLabel: t(TABLE_I18N.statCardLabel, label, formattedValue),
135
+ accessibilityRole: "text",
136
+ style: [styles.card, { backgroundColor: colors.surface, borderColor: colors.border }],
137
+ testID,
138
+ children: [
139
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles.label, { color: colors.textSecondary }], children: label }),
140
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles.value, { color: colors.text }], children: formattedValue })
141
+ ]
142
+ }
143
+ );
144
+ });
145
+ StatCard.displayName = "StatCard";
126
146
  var BORDER_WIDTH = 1;
127
147
  var BORDER_RADIUS = 12;
128
148
  var COLUMN_GAP = 16;
@@ -957,6 +977,12 @@ function FilterBar({
957
977
  !!actions && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [chromeStyles.filtersActions, o?.filtersActions], children: actions })
958
978
  ] });
959
979
  }
980
+
981
+ // src/accessibleName.ts
982
+ function accessibleName(translated, key, fallback) {
983
+ const isUntranslated = translated === key || translated === "";
984
+ return isUntranslated ? fallback : translated;
985
+ }
960
986
  var CHEVRON_DOWN = "\u25BE";
961
987
  var CHEVRON_UP = "\u25B4";
962
988
  var IS_WEB2 = reactNative.Platform.OS === "web";
@@ -1022,6 +1048,8 @@ function SizeDropdown({
1022
1048
  pageSizeOptions,
1023
1049
  onPageSizeChange,
1024
1050
  testID,
1051
+ triggerLabel,
1052
+ getOptionLabel,
1025
1053
  triggerHint,
1026
1054
  optionHint,
1027
1055
  textColor,
@@ -1065,7 +1093,7 @@ function SizeDropdown({
1065
1093
  {
1066
1094
  testID: `${testID}-size-${size}`,
1067
1095
  accessibilityRole: "menuitem",
1068
- accessibilityLabel: String(size),
1096
+ accessibilityLabel: getOptionLabel(size),
1069
1097
  accessibilityHint: optionHint,
1070
1098
  accessibilityState: { selected: active },
1071
1099
  onPress: () => select(size),
@@ -1083,7 +1111,7 @@ function SizeDropdown({
1083
1111
  {
1084
1112
  testID: `${testID}-size-trigger`,
1085
1113
  accessibilityRole: "button",
1086
- accessibilityLabel: String(pageSize),
1114
+ accessibilityLabel: triggerLabel,
1087
1115
  accessibilityHint: triggerHint,
1088
1116
  accessibilityState: { expanded: isOpen },
1089
1117
  "aria-expanded": isOpen,
@@ -1120,6 +1148,14 @@ function NavButton({ label, hint, disabled, onPress, color, border, testID, styl
1120
1148
  }
1121
1149
  );
1122
1150
  }
1151
+ function rowsTriggerLabel(t, pageSize) {
1152
+ const size = String(pageSize);
1153
+ return accessibleName(t(TABLE_I18N.pagerRowsTriggerLabel, size), TABLE_I18N.pagerRowsTriggerLabel, size);
1154
+ }
1155
+ function rowsOptionLabel(t, optionSize) {
1156
+ const size = String(optionSize);
1157
+ return accessibleName(t(TABLE_I18N.pagerRowsOptionLabel, size), TABLE_I18N.pagerRowsOptionLabel, size);
1158
+ }
1123
1159
  function RowsControl({ pageSize, pageSizeOptions, onPageSizeChange, isDropdown, testID, styleOverrides: o }) {
1124
1160
  const { theme, t } = uiFeedback.useUi();
1125
1161
  const { colors, palette } = theme;
@@ -1133,6 +1169,8 @@ function RowsControl({ pageSize, pageSizeOptions, onPageSizeChange, isDropdown,
1133
1169
  pageSizeOptions,
1134
1170
  onPageSizeChange,
1135
1171
  testID,
1172
+ triggerLabel: rowsTriggerLabel(t, pageSize),
1173
+ getOptionLabel: (size) => rowsOptionLabel(t, size),
1136
1174
  triggerHint: t(TABLE_I18N.pagerRowsTriggerHint),
1137
1175
  optionHint: t(TABLE_I18N.pagerRowsOptionHint),
1138
1176
  textColor: colors.text,
@@ -1150,7 +1188,7 @@ function RowsControl({ pageSize, pageSizeOptions, onPageSizeChange, isDropdown,
1150
1188
  {
1151
1189
  testID: `${testID}-size-${size}`,
1152
1190
  accessibilityRole: "button",
1153
- accessibilityLabel: String(size),
1191
+ accessibilityLabel: rowsOptionLabel(t, size),
1154
1192
  accessibilityHint: t(TABLE_I18N.pagerRowsOptionHint),
1155
1193
  accessibilityState: { selected: active },
1156
1194
  hitSlop: PAGER_HIT_SLOP,
@@ -1447,6 +1485,13 @@ var FILTERS_I18N = {
1447
1485
  selectPlaceholder: "uiTables.filters.selectPlaceholder",
1448
1486
  dropdownHint: "uiTables.filters.dropdownHint",
1449
1487
  optionHint: "uiTables.filters.optionHint",
1488
+ /**
1489
+ * Accessible NAME of a select trigger, e.g. "{{p1}}: {{p2}}" → "Status: Active". The
1490
+ * trigger's `accessibilityLabel` REPLACES its visible text for a screen reader, so labelling
1491
+ * it with the field name alone silently hides the current selection. Untranslated it
1492
+ * degrades to the field label alone (prior behaviour) — never to the raw key.
1493
+ */
1494
+ selectTriggerLabel: "uiTables.filters.selectTriggerLabel",
1450
1495
  from: "uiTables.filters.from",
1451
1496
  to: "uiTables.filters.to"
1452
1497
  };
@@ -1619,7 +1664,7 @@ function AnchoredMenu({
1619
1664
  var CHEVRON_DOWN2 = "\u25BE";
1620
1665
  var CHEVRON_UP2 = "\u25B4";
1621
1666
  function SelectField({ field, barTestID, value, onChange, placeholder, dropdownHint, optionHint }) {
1622
- const { theme } = uiFeedback.useUi();
1667
+ const { theme, t } = uiFeedback.useUi();
1623
1668
  const { colors, palette } = theme;
1624
1669
  const anchorRef = React4.useRef(null);
1625
1670
  const [isOpen, setIsOpen] = React4.useState(false);
@@ -1628,6 +1673,11 @@ function SelectField({ field, barTestID, value, onChange, placeholder, dropdownH
1628
1673
  const found = field.options.find((o) => o.value === value);
1629
1674
  return found?.label ?? field.placeholder ?? placeholder;
1630
1675
  }, [field.options, field.placeholder, placeholder, value]);
1676
+ const triggerLabel = accessibleName(
1677
+ t(FILTERS_I18N.selectTriggerLabel, field.label, selectedLabel),
1678
+ FILTERS_I18N.selectTriggerLabel,
1679
+ field.label
1680
+ );
1631
1681
  const close = React4.useCallback(() => {
1632
1682
  setIsOpen(false);
1633
1683
  }, []);
@@ -1646,7 +1696,7 @@ function SelectField({ field, barTestID, value, onChange, placeholder, dropdownH
1646
1696
  reactNative.Pressable,
1647
1697
  {
1648
1698
  accessibilityRole: "button",
1649
- accessibilityLabel: field.label,
1699
+ accessibilityLabel: triggerLabel,
1650
1700
  accessibilityHint: field.accessibilityHint ?? dropdownHint,
1651
1701
  accessibilityState: { expanded: isOpen },
1652
1702
  "aria-expanded": isOpen,