@multiplatform.one/forms 7.8.0 → 7.11.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/dist/cjs/Button/index.cjs +1 -1
- package/dist/cjs/Button/index.native.js +5 -3
- package/dist/cjs/Button/index.native.js.map +1 -1
- package/dist/cjs/InputParts/index.cjs +11 -2
- package/dist/cjs/InputParts/index.native.js +11 -2
- package/dist/cjs/InputParts/index.native.js.map +1 -1
- package/dist/cjs/fields/Barcode/qr.native.js +34 -34
- package/dist/cjs/fields/FileUpload/index.cjs +6 -0
- package/dist/cjs/fields/FileUpload/index.native.js +6 -0
- package/dist/cjs/fields/FileUpload/index.native.js.map +1 -1
- package/dist/cjs/fields/Icon/drawnSet.cjs +3 -1
- package/dist/cjs/fields/Icon/drawnSet.native.js +3 -1
- package/dist/cjs/fields/Icon/drawnSet.native.js.map +1 -1
- package/dist/cjs/fields/RadioGroup/index.cjs +34 -5
- package/dist/cjs/fields/RadioGroup/index.native.js +49 -7
- package/dist/cjs/fields/RadioGroup/index.native.js.map +1 -1
- package/dist/cjs/fields/ToggleGroup/index.cjs +35 -2
- package/dist/cjs/fields/ToggleGroup/index.native.js +42 -2
- package/dist/cjs/fields/ToggleGroup/index.native.js.map +1 -1
- package/dist/cjs/shared/nativeA11y.cjs +57 -0
- package/dist/cjs/shared/nativeA11y.native.js +61 -0
- package/dist/cjs/shared/nativeA11y.native.js.map +1 -0
- package/dist/esm/AdaptivePopup/index.native.js.map +1 -1
- package/dist/esm/Button/index.mjs +1 -1
- package/dist/esm/Button/index.mjs.map +1 -1
- package/dist/esm/Button/index.native.js +5 -3
- package/dist/esm/Button/index.native.js.map +1 -1
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/ContextualSaveBar/UnsavedChangesDialog.native.js.map +1 -1
- package/dist/esm/ContextualSaveBar/clientKnownIdentity.native.js.map +1 -1
- package/dist/esm/ContextualSaveBar/commitImmediateField.native.js.map +1 -1
- package/dist/esm/ContextualSaveBar/index.native.js.map +1 -1
- package/dist/esm/ContextualSaveBar/useUnsavedChangesGuard.native.js.map +1 -1
- package/dist/esm/ControlGroup/index.native.js.map +1 -1
- package/dist/esm/DescriptionList/index.native.js.map +1 -1
- package/dist/esm/ErrorSummary.native.js.map +1 -1
- package/dist/esm/FieldDisplay/editMode.native.js.map +1 -1
- package/dist/esm/FieldDisplay/formatters.native.js.map +1 -1
- package/dist/esm/FieldDisplay/index.native.js.map +1 -1
- package/dist/esm/FieldGroup.native.js.map +1 -1
- package/dist/esm/FloatingPanel/nestedAction.native.js.map +1 -1
- package/dist/esm/FloatingPanel/useFloatingPanel.native.js.map +1 -1
- package/dist/esm/Form/index.native.js.map +1 -1
- package/dist/esm/Form/validateOn.native.js.map +1 -1
- package/dist/esm/FormGrid.native.js.map +1 -1
- package/dist/esm/FormSection.native.js.map +1 -1
- package/dist/esm/InputParts/index.mjs +11 -2
- package/dist/esm/InputParts/index.mjs.map +1 -1
- package/dist/esm/InputParts/index.native.js +11 -2
- package/dist/esm/InputParts/index.native.js.map +1 -1
- package/dist/esm/Label/index.native.js.map +1 -1
- package/dist/esm/Skeleton/index.native.js.map +1 -1
- package/dist/esm/Spinner/SpinnerGlyph.native.js.map +1 -1
- package/dist/esm/Spinner/spinnerSize.native.js.map +1 -1
- package/dist/esm/Table/index.native.js.map +1 -1
- package/dist/esm/Wheel/haptic.native.js.map +1 -1
- package/dist/esm/Wheel/index.native.js.map +1 -1
- package/dist/esm/actionLabel.native.js.map +1 -1
- package/dist/esm/fieldDefaults.native.js.map +1 -1
- package/dist/esm/fieldLayout.native.js.map +1 -1
- package/dist/esm/fields/Barcode/BarcodePreview.native.js.map +1 -1
- package/dist/esm/fields/Barcode/code128.native.js.map +1 -1
- package/dist/esm/fields/Barcode/index.native.js.map +1 -1
- package/dist/esm/fields/Barcode/qr.native.js +34 -34
- package/dist/esm/fields/Barcode/qr.native.js.map +1 -1
- package/dist/esm/fields/Barcode/scannerTypes.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/Checkbox.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/CheckboxBox.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/CheckboxCard.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/CheckboxFieldFrame.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/CheckboxGroup.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/checkboxGroupContext.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/index.native.js.map +1 -1
- package/dist/esm/fields/ColorPicker/index.native.js.map +1 -1
- package/dist/esm/fields/ColorPicker/parts.native.js.map +1 -1
- package/dist/esm/fields/Combobox/authorOptions.native.js.map +1 -1
- package/dist/esm/fields/Combobox/index.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/Calendar.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/DateRangePicker.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/DatetimePicker.catalog.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/MonthPicker.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/MultiDatePicker.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/catalog.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/fieldValueSync.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/parts.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/utils.native.js.map +1 -1
- package/dist/esm/fields/Duration/durationMath.native.js.map +1 -1
- package/dist/esm/fields/Duration/index.native.js.map +1 -1
- package/dist/esm/fields/FileUpload/filePickerTypes.native.js.map +1 -1
- package/dist/esm/fields/FileUpload/index.mjs +6 -0
- package/dist/esm/fields/FileUpload/index.mjs.map +1 -1
- package/dist/esm/fields/FileUpload/index.native.js +6 -0
- package/dist/esm/fields/FileUpload/index.native.js.map +1 -1
- package/dist/esm/fields/FileUpload/nativePickerLoader.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/expoMapsLoader.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/geoValue.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/geocoder.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/index.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/mapMath.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/mapTypes.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/nativeSearchFocus.native.js.map +1 -1
- package/dist/esm/fields/Icon/drawnSet.mjs +3 -1
- package/dist/esm/fields/Icon/drawnSet.mjs.map +1 -1
- package/dist/esm/fields/Icon/drawnSet.native.js +3 -1
- package/dist/esm/fields/Icon/drawnSet.native.js.map +1 -1
- package/dist/esm/fields/Icon/index.native.js.map +1 -1
- package/dist/esm/fields/ImageField/index.native.js.map +1 -1
- package/dist/esm/fields/Input/index.native.js.map +1 -1
- package/dist/esm/fields/MentionInput/index.native.js.map +1 -1
- package/dist/esm/fields/OTPInput/index.native.js.map +1 -1
- package/dist/esm/fields/OTPInput/otpCellCss.native.js.map +1 -1
- package/dist/esm/fields/PhoneInput/dialCodes.native.js.map +1 -1
- package/dist/esm/fields/PhoneInput/index.native.js.map +1 -1
- package/dist/esm/fields/PhoneInput/phone.native.js.map +1 -1
- package/dist/esm/fields/Progress/index.native.js.map +1 -1
- package/dist/esm/fields/RadioGroup/index.mjs +34 -5
- package/dist/esm/fields/RadioGroup/index.mjs.map +1 -1
- package/dist/esm/fields/RadioGroup/index.native.js +49 -7
- package/dist/esm/fields/RadioGroup/index.native.js.map +1 -1
- package/dist/esm/fields/Rating/index.native.js.map +1 -1
- package/dist/esm/fields/Rating/ratingMath.native.js.map +1 -1
- package/dist/esm/fields/Rating/types.native.js.map +1 -1
- package/dist/esm/fields/SearchInput/index.native.js.map +1 -1
- package/dist/esm/fields/Select/index.native.js.map +1 -1
- package/dist/esm/fields/Signature/index.native.js.map +1 -1
- package/dist/esm/fields/Slider/index.native.js.map +1 -1
- package/dist/esm/fields/Slider/jumpMotion.native.js.map +1 -1
- package/dist/esm/fields/Stepper/index.native.js.map +1 -1
- package/dist/esm/fields/Stepper/resolveStepperPlacement.native.js.map +1 -1
- package/dist/esm/fields/Switch/index.native.js.map +1 -1
- package/dist/esm/fields/TextArea/index.native.js.map +1 -1
- package/dist/esm/fields/TimePicker/catalog.native.js.map +1 -1
- package/dist/esm/fields/TimePicker/parts.native.js.map +1 -1
- package/dist/esm/fields/TimeRangeScrubber/geometry.native.js.map +1 -1
- package/dist/esm/fields/TimeRangeScrubber/index.native.js.map +1 -1
- package/dist/esm/fields/ToggleGroup/index.mjs +35 -2
- package/dist/esm/fields/ToggleGroup/index.mjs.map +1 -1
- package/dist/esm/fields/ToggleGroup/index.native.js +42 -2
- package/dist/esm/fields/ToggleGroup/index.native.js.map +1 -1
- package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
- package/dist/esm/fields/nativeDateTime/osDateTimeIosDisplay.native.js.map +1 -1
- package/dist/esm/fields/nativeSelect.native.js.map +1 -1
- package/dist/esm/fields/selectedOrder.native.js.map +1 -1
- package/dist/esm/formSpacing.native.js.map +1 -1
- package/dist/esm/hooks/useFocusManagement.native.js.map +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/requiredMarking.native.js.map +1 -1
- package/dist/esm/shared/TimeColumn.native.js.map +1 -1
- package/dist/esm/shared/capabilityPreflight.native.js.map +1 -1
- package/dist/esm/shared/colorRamps.native.js.map +1 -1
- package/dist/esm/shared/devWarn.native.js.map +1 -1
- package/dist/esm/shared/floatingList.native.js.map +1 -1
- package/dist/esm/shared/focusManagement.native.js.map +1 -1
- package/dist/esm/shared/groupContext.native.js.map +1 -1
- package/dist/esm/shared/i18n.native.js.map +1 -1
- package/dist/esm/shared/nativeA11y.mjs +31 -0
- package/dist/esm/shared/nativeA11y.mjs.map +1 -0
- package/dist/esm/shared/nativeA11y.native.js +32 -0
- package/dist/esm/shared/nativeA11y.native.js.map +1 -0
- package/dist/esm/shared/pickerTriggerContract.native.js.map +1 -1
- package/dist/esm/shared/pressSlopProps.native.js.map +1 -1
- package/dist/esm/shared/t.native.js.map +1 -1
- package/dist/esm/shared/tableCellContext.native.js.map +1 -1
- package/dist/esm/shared/useDragScroll.native.js.map +1 -1
- package/dist/esm/shared/useKeyboardInset.native.js.map +1 -1
- package/dist/esm/shared/useSheetEscapeDismiss.native.js.map +1 -1
- package/dist/esm/shared/useWheelIncrement.native.js.map +1 -1
- package/dist/esm/shared/utils.native.js.map +1 -1
- package/dist/esm/shared/zIndex.native.js.map +1 -1
- package/dist/esm/themedPrimitives.native.js.map +1 -1
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/utils/LinkCell.native.js.map +1 -1
- package/dist/jsx/Button/index.mjs +1 -1
- package/dist/jsx/Button/index.mjs.map +1 -1
- package/dist/jsx/Button/index.native.js +5 -3
- package/dist/jsx/Button/index.native.js.map +1 -1
- package/dist/jsx/InputParts/index.mjs +11 -2
- package/dist/jsx/InputParts/index.mjs.map +1 -1
- package/dist/jsx/InputParts/index.native.js +11 -2
- package/dist/jsx/InputParts/index.native.js.map +1 -1
- package/dist/jsx/fields/Barcode/qr.native.js +34 -34
- package/dist/jsx/fields/FileUpload/index.mjs +6 -0
- package/dist/jsx/fields/FileUpload/index.mjs.map +1 -1
- package/dist/jsx/fields/FileUpload/index.native.js +6 -0
- package/dist/jsx/fields/FileUpload/index.native.js.map +1 -1
- package/dist/jsx/fields/Icon/drawnSet.mjs +3 -1
- package/dist/jsx/fields/Icon/drawnSet.mjs.map +1 -1
- package/dist/jsx/fields/Icon/drawnSet.native.js +3 -1
- package/dist/jsx/fields/Icon/drawnSet.native.js.map +1 -1
- package/dist/jsx/fields/RadioGroup/index.mjs +34 -5
- package/dist/jsx/fields/RadioGroup/index.mjs.map +1 -1
- package/dist/jsx/fields/RadioGroup/index.native.js +49 -7
- package/dist/jsx/fields/RadioGroup/index.native.js.map +1 -1
- package/dist/jsx/fields/ToggleGroup/index.mjs +35 -2
- package/dist/jsx/fields/ToggleGroup/index.mjs.map +1 -1
- package/dist/jsx/fields/ToggleGroup/index.native.js +42 -2
- package/dist/jsx/fields/ToggleGroup/index.native.js.map +1 -1
- package/dist/jsx/shared/nativeA11y.mjs +31 -0
- package/dist/jsx/shared/nativeA11y.mjs.map +1 -0
- package/dist/jsx/shared/nativeA11y.native.js +61 -0
- package/dist/jsx/shared/nativeA11y.native.js.map +1 -0
- package/package.json +11 -10
- package/src/Button/Button.fontWeight.spec.tsx +75 -0
- package/src/Button/index.tsx +5 -3
- package/src/FieldGroup.stories.tsx +3 -7
- package/src/FieldLayout.stories.tsx +34 -12
- package/src/Fieldset.stories.tsx +3 -7
- package/src/FormGrid.stories.tsx +5 -11
- package/src/InputParts/InputButton.spec.tsx +16 -0
- package/src/InputParts/index.tsx +19 -2
- package/src/fieldFamilyStories.radius.spec.tsx +118 -0
- package/src/fields/Barcode/Barcode.spec.tsx +2 -0
- package/src/fields/FileUpload/FileUpload.spec.tsx +29 -0
- package/src/fields/FileUpload/index.tsx +6 -0
- package/src/fields/Icon/drawnSet.tsx +7 -2
- package/src/fields/RadioGroup/RadioGroup.native.spec.tsx +67 -0
- package/src/fields/RadioGroup/index.tsx +82 -8
- package/src/fields/ToggleGroup/ToggleGroup.native.spec.tsx +73 -0
- package/src/fields/ToggleGroup/ToggleGroup.spec.tsx +49 -0
- package/src/fields/ToggleGroup/index.tsx +76 -1
- package/src/shared/nativeA11y.spec.ts +64 -0
- package/src/shared/nativeA11y.ts +80 -0
- package/types/Button/index.d.ts.map +1 -1
- package/types/InputParts/index.d.ts.map +1 -1
- package/types/fields/FileUpload/index.d.ts.map +1 -1
- package/types/fields/Icon/drawnSet.d.ts.map +1 -1
- package/types/fields/RadioGroup/index.d.ts +28 -1
- package/types/fields/RadioGroup/index.d.ts.map +1 -1
- package/types/fields/ToggleGroup/index.d.ts +30 -1
- package/types/fields/ToggleGroup/index.d.ts.map +1 -1
- package/types/shared/nativeA11y.d.ts +61 -0
- package/types/shared/nativeA11y.d.ts.map +1 -0
|
@@ -28,6 +28,7 @@ import { getSize } from "@tamagui/get-token";
|
|
|
28
28
|
import { Skeleton } from "../../Skeleton";
|
|
29
29
|
import { Field, FieldLayout } from "../../fieldLayout";
|
|
30
30
|
import { formControlColors, formSelectedColors } from "../../shared/colorRamps";
|
|
31
|
+
import { choiceItemA11y, composeA11yName } from "../../shared/nativeA11y";
|
|
31
32
|
import {
|
|
32
33
|
getElevationWrapperProps,
|
|
33
34
|
getFieldError,
|
|
@@ -131,6 +132,14 @@ export interface RadioGroupOption {
|
|
|
131
132
|
disabled?: boolean;
|
|
132
133
|
/** Muted secondary line under the label; rendered in `card` mode. */
|
|
133
134
|
description?: string;
|
|
135
|
+
/**
|
|
136
|
+
* MPO-283 — accessible name for THIS option, overriding `label`. Use it
|
|
137
|
+
* when the option carries meaning the label text does not: a glyph, or a
|
|
138
|
+
* state encoded in fill/weight/position rather than words.
|
|
139
|
+
*/
|
|
140
|
+
accessibilityLabel?: string;
|
|
141
|
+
/** Extra spoken context for this option (native `accessibilityHint`). */
|
|
142
|
+
accessibilityHint?: string;
|
|
134
143
|
}
|
|
135
144
|
|
|
136
145
|
export interface RadioGroupProps {
|
|
@@ -179,11 +188,33 @@ export interface RadioGroupProps {
|
|
|
179
188
|
* primitives (same anatomy as `CheckboxGroup card`).
|
|
180
189
|
*/
|
|
181
190
|
card?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* MPO-283 — accessible name for the whole group.
|
|
193
|
+
*
|
|
194
|
+
* tamagui does not map `aria-label` onto React Native's
|
|
195
|
+
* `accessibilityLabel`, so the web attribute is inert on native; this prop
|
|
196
|
+
* is the native channel and `aria-label` is accepted as an alias.
|
|
197
|
+
*
|
|
198
|
+
* iOS speaks elements, never non-element containers, so a name set here is
|
|
199
|
+
* PREFIXED onto each option's accessible name ("Phase, CREDITS") instead of
|
|
200
|
+
* sitting on the frame where nothing reads it. Options stay individually
|
|
201
|
+
* reachable and keep their own checked state.
|
|
202
|
+
*/
|
|
203
|
+
accessibilityLabel?: string;
|
|
204
|
+
/** Alias for `accessibilityLabel`; also emitted as the web attribute. */
|
|
205
|
+
"aria-label"?: string;
|
|
206
|
+
/** Web-only name reference. Native has no id-based equivalent. */
|
|
207
|
+
"aria-labelledby"?: string;
|
|
208
|
+
/** Extra spoken context for the group (native `accessibilityHint`). */
|
|
209
|
+
accessibilityHint?: string;
|
|
182
210
|
}
|
|
183
211
|
|
|
184
212
|
interface RadioOptionItemProps {
|
|
185
213
|
option: RadioGroupOption;
|
|
186
214
|
itemId: string;
|
|
215
|
+
/** MPO-283 — the resolved native accessible name for this option. */
|
|
216
|
+
nativeLabel: string;
|
|
217
|
+
nativeHint?: string;
|
|
187
218
|
a11y?: { "aria-labelledby"?: string; "aria-describedby"?: string };
|
|
188
219
|
selected: boolean;
|
|
189
220
|
isTabStop?: boolean;
|
|
@@ -203,6 +234,8 @@ interface RadioOptionItemProps {
|
|
|
203
234
|
function RadioOptionItem({
|
|
204
235
|
option,
|
|
205
236
|
itemId,
|
|
237
|
+
nativeLabel,
|
|
238
|
+
nativeHint,
|
|
206
239
|
a11y,
|
|
207
240
|
selected,
|
|
208
241
|
isTabStop,
|
|
@@ -277,15 +310,22 @@ function RadioOptionItem({
|
|
|
277
310
|
{...(groupDisabled || option.disabled ? disabledChrome : undefined)}
|
|
278
311
|
pointerEvents={readOnly ? "none" : undefined}
|
|
279
312
|
{...a11y}
|
|
280
|
-
// RN only exposes the radio
|
|
281
|
-
//
|
|
313
|
+
// MPO-283. RN only exposes the radio when `accessible` is set, and the
|
|
314
|
+
// aria-* spellings this block used to carry never reached iOS at all:
|
|
315
|
+
// tamagui does not map them onto React Native's accessibility props, so
|
|
316
|
+
// options came back as bare StaticText with no role and no checked
|
|
317
|
+
// state. The RN prop names are the ones iOS actually reads.
|
|
282
318
|
{...(!isWeb
|
|
283
|
-
? {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
319
|
+
? choiceItemA11y({
|
|
320
|
+
kind: "radio",
|
|
321
|
+
name: nativeLabel,
|
|
322
|
+
selected,
|
|
323
|
+
disabled: Boolean(groupDisabled || option.disabled),
|
|
324
|
+
hint: nativeHint,
|
|
325
|
+
})
|
|
326
|
+
: option.accessibilityLabel
|
|
327
|
+
? { "aria-label": option.accessibilityLabel }
|
|
328
|
+
: {})}
|
|
289
329
|
{...(hoverProps && {
|
|
290
330
|
hoverStyle: {
|
|
291
331
|
...hoverProps,
|
|
@@ -344,6 +384,10 @@ export function RadioGroup({
|
|
|
344
384
|
skeleton,
|
|
345
385
|
compact,
|
|
346
386
|
card,
|
|
387
|
+
accessibilityLabel,
|
|
388
|
+
accessibilityHint,
|
|
389
|
+
"aria-label": ariaLabel,
|
|
390
|
+
"aria-labelledby": ariaLabelledBy,
|
|
347
391
|
}: RadioGroupProps) {
|
|
348
392
|
// Canonical `onChange` and the alias `onValueChange` both fire from the
|
|
349
393
|
// single emit site below (same reconciliation as Switch).
|
|
@@ -351,6 +395,17 @@ export function RadioGroup({
|
|
|
351
395
|
onChange?.(val);
|
|
352
396
|
onValueChange?.(val);
|
|
353
397
|
};
|
|
398
|
+
// MPO-283: one name, two channels — tamagui drops `aria-label` on native, so
|
|
399
|
+
// the prop and the attribute are reconciled here.
|
|
400
|
+
const groupA11yName = accessibilityLabel ?? ariaLabel;
|
|
401
|
+
// iOS reads elements, not containers, so an explicit group name rides in
|
|
402
|
+
// front of each option's own name rather than sitting on the frame.
|
|
403
|
+
const optionA11yName = (option: RadioGroupOption) =>
|
|
404
|
+
composeA11yName(
|
|
405
|
+
groupA11yName,
|
|
406
|
+
option.accessibilityLabel ??
|
|
407
|
+
(typeof option.label === "string" ? option.label : String(option.value)),
|
|
408
|
+
);
|
|
354
409
|
const { resolvedForm, knobProps, control, text, elevation, disabledState, id } = useFormField({
|
|
355
410
|
form: formProp,
|
|
356
411
|
id: idProp,
|
|
@@ -440,6 +495,8 @@ export function RadioGroup({
|
|
|
440
495
|
<RadioOptionItem
|
|
441
496
|
option={option}
|
|
442
497
|
itemId={itemId}
|
|
498
|
+
nativeLabel={optionA11yName(option)}
|
|
499
|
+
nativeHint={option.accessibilityHint ?? accessibilityHint}
|
|
443
500
|
a11y={a11y}
|
|
444
501
|
selected={!!selected}
|
|
445
502
|
isTabStop={isTabStop}
|
|
@@ -541,6 +598,15 @@ export function RadioGroup({
|
|
|
541
598
|
)}
|
|
542
599
|
<Label
|
|
543
600
|
htmlFor={itemId}
|
|
601
|
+
// MPO-283: on native the radio itself now carries this text as
|
|
602
|
+
// its accessible name, so leaving the Label in the tree reads
|
|
603
|
+
// every option twice. Web keeps the label/control association.
|
|
604
|
+
{...(!isWeb
|
|
605
|
+
? {
|
|
606
|
+
accessibilityElementsHidden: true,
|
|
607
|
+
importantForAccessibility: "no-hide-descendants" as const,
|
|
608
|
+
}
|
|
609
|
+
: undefined)}
|
|
544
610
|
size={(size || knobProps.sizeToken) as FontSizeTokens}
|
|
545
611
|
{...knobProps.body}
|
|
546
612
|
color={knobProps.textAccentColor}
|
|
@@ -615,6 +681,14 @@ export function RadioGroup({
|
|
|
615
681
|
aria-required={required || undefined}
|
|
616
682
|
aria-invalid={hasError || undefined}
|
|
617
683
|
aria-readonly={readOnly || undefined}
|
|
684
|
+
// MPO-283: web reads the attribute, Android reads the RN prop off the
|
|
685
|
+
// container. iOS reads neither, which is why the name is also prefixed
|
|
686
|
+
// onto every option above.
|
|
687
|
+
{...(groupA11yName ? { "aria-label": groupA11yName } : undefined)}
|
|
688
|
+
{...(ariaLabelledBy ? { "aria-labelledby": ariaLabelledBy } : undefined)}
|
|
689
|
+
{...(!isWeb && groupA11yName
|
|
690
|
+
? { accessibilityLabel: groupA11yName, accessibilityRole: "radiogroup" as const }
|
|
691
|
+
: undefined)}
|
|
618
692
|
>
|
|
619
693
|
{renderItems(radioValue, emit)}
|
|
620
694
|
</TamaguiRadioGroup>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
2
|
+
import { describe, expect, it, vi } from "vitest";
|
|
3
|
+
import { ToggleGroup } from "./index";
|
|
4
|
+
|
|
5
|
+
// MPO-283. Before this the whole segmented control was absent from the iOS
|
|
6
|
+
// tree. See RadioGroup.native.spec.tsx for why the state object is pinned in
|
|
7
|
+
// shared/nativeA11y.spec.ts rather than here.
|
|
8
|
+
vi.mock("tamagui", async (importOriginal) => ({
|
|
9
|
+
...(await importOriginal<typeof import("tamagui")>()),
|
|
10
|
+
isWeb: false,
|
|
11
|
+
}));
|
|
12
|
+
|
|
13
|
+
const severity = [
|
|
14
|
+
{ label: "error", value: "error" },
|
|
15
|
+
{ label: "warning", value: "warning" },
|
|
16
|
+
{ label: "info", value: "info", disabled: true },
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
const names = (container: HTMLElement) =>
|
|
20
|
+
Array.from(container.querySelectorAll("[accessibilityrole]")).map((el) => [
|
|
21
|
+
el.getAttribute("accessibilityrole"),
|
|
22
|
+
el.getAttribute("accessibilitylabel"),
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
describe("native ToggleGroup accessibility contract", () => {
|
|
26
|
+
it("puts every segment in the tree as a named control", () => {
|
|
27
|
+
const { container } = renderWithProviders(
|
|
28
|
+
<ToggleGroup label="Severity" options={severity} value="warning" />,
|
|
29
|
+
);
|
|
30
|
+
expect(names(container)).toEqual([
|
|
31
|
+
["button", "error"],
|
|
32
|
+
["button", "warning"],
|
|
33
|
+
["button", "info"],
|
|
34
|
+
]);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// The platform role is `button` for both kinds, measured: a radio/checkbox
|
|
38
|
+
// accessibilityRole takes the element out of the iOS tree entirely.
|
|
39
|
+
it("keeps every segment in the tree when the group takes several values", () => {
|
|
40
|
+
const { container } = renderWithProviders(
|
|
41
|
+
<ToggleGroup type="multiple" options={severity} value={["error"]} />,
|
|
42
|
+
);
|
|
43
|
+
expect(names(container)).toEqual([
|
|
44
|
+
["button", "error"],
|
|
45
|
+
["button", "warning"],
|
|
46
|
+
["button", "info"],
|
|
47
|
+
]);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("prefixes a group accessibilityLabel onto each segment, because iOS never reads a container", () => {
|
|
51
|
+
const { container } = renderWithProviders(
|
|
52
|
+
<ToggleGroup accessibilityLabel="Severity" options={severity} value="warning" />,
|
|
53
|
+
);
|
|
54
|
+
expect(names(container)).toContainEqual(["button", "Severity, warning"]);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("takes aria-label as an alias, since tamagui never maps it onto native", () => {
|
|
58
|
+
const { container } = renderWithProviders(
|
|
59
|
+
<ToggleGroup aria-label="Severity" options={severity} value="warning" />,
|
|
60
|
+
);
|
|
61
|
+
expect(names(container)).toContainEqual(["button", "Severity, warning"]);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("lets a segment override its own name", () => {
|
|
65
|
+
const { container } = renderWithProviders(
|
|
66
|
+
<ToggleGroup
|
|
67
|
+
options={[{ label: "●", value: "on", accessibilityLabel: "Filled" }]}
|
|
68
|
+
value="on"
|
|
69
|
+
/>,
|
|
70
|
+
);
|
|
71
|
+
expect(names(container)).toEqual([["button", "Filled"]]);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -294,6 +294,55 @@ describe("ToggleGroup", () => {
|
|
|
294
294
|
});
|
|
295
295
|
});
|
|
296
296
|
|
|
297
|
+
describe("per-segment elevation wrapper (MPO-133)", () => {
|
|
298
|
+
function elevationWrapperFor(segment: HTMLElement): HTMLElement {
|
|
299
|
+
const wrapper = segment.parentElement as HTMLElement;
|
|
300
|
+
expect(wrapper?.getAttribute("style") ?? "").toMatch(/box-shadow/);
|
|
301
|
+
return wrapper;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
it("lays the wrapper out as a row so the segment's zero flex-basis sizes width, not height", () => {
|
|
305
|
+
const { container } = renderWithHouseThemes(
|
|
306
|
+
<ToggleGroup label="Alignment" options={options} defaultValue="left" />,
|
|
307
|
+
);
|
|
308
|
+
const segments = [...container.querySelectorAll("[data-state]")] as HTMLElement[];
|
|
309
|
+
expect(segments).toHaveLength(3);
|
|
310
|
+
for (const segment of segments) {
|
|
311
|
+
expect(segment.className).toContain("_fb-0px");
|
|
312
|
+
const wrapper = elevationWrapperFor(segment);
|
|
313
|
+
expect(wrapper.className).toContain("_fd-row");
|
|
314
|
+
expect(wrapper.className).toContain("_fg-1");
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
it("keeps the row wrapper in the vertical orientation", () => {
|
|
319
|
+
const { container } = renderWithHouseThemes(
|
|
320
|
+
<ToggleGroup
|
|
321
|
+
label="Alignment"
|
|
322
|
+
options={options}
|
|
323
|
+
defaultValue="left"
|
|
324
|
+
orientation="vertical"
|
|
325
|
+
/>,
|
|
326
|
+
);
|
|
327
|
+
const segments = [...container.querySelectorAll("[data-state]")] as HTMLElement[];
|
|
328
|
+
expect(segments).toHaveLength(3);
|
|
329
|
+
for (const segment of segments) {
|
|
330
|
+
expect(segment.className).toContain("_fb-0px");
|
|
331
|
+
expect(elevationWrapperFor(segment).className).toContain("_fd-row");
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
it("leaves the group frame flat while the segments carry the shadow (E-FLAT)", () => {
|
|
336
|
+
const { container } = renderWithHouseThemes(
|
|
337
|
+
<ToggleGroup label="Alignment" options={options} defaultValue="left" />,
|
|
338
|
+
);
|
|
339
|
+
const group = container.querySelector('[role="group"]') as HTMLElement;
|
|
340
|
+
expect(group).toBeTruthy();
|
|
341
|
+
expect(group.className).not.toMatch(/_bxsh-/);
|
|
342
|
+
expect(group.getAttribute("style") ?? "").not.toMatch(/box-shadow/);
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
|
|
297
346
|
describe("one tab stop (LC-49 / SB-M-217)", () => {
|
|
298
347
|
it("exposes exactly one tab stop among the segments", () => {
|
|
299
348
|
const { container } = renderWithHouseThemes(
|
|
@@ -19,6 +19,7 @@ import { Skeleton } from "../../Skeleton";
|
|
|
19
19
|
import { Field, FieldLayout } from "../../fieldLayout";
|
|
20
20
|
import { formButtonColors, formCommonColors, formInputColors } from "../../shared/colorRamps";
|
|
21
21
|
import { warnBareDisabled } from "../../shared/devWarn";
|
|
22
|
+
import { choiceItemA11y, composeA11yName } from "../../shared/nativeA11y";
|
|
22
23
|
import {
|
|
23
24
|
getElevationWrapperProps,
|
|
24
25
|
getFieldError,
|
|
@@ -79,8 +80,18 @@ function ToggleItemWithElevation({
|
|
|
79
80
|
groupedRadius: Record<string, unknown>;
|
|
80
81
|
} & Record<string, any>) {
|
|
81
82
|
if (elevationWrapperProps.elevation) {
|
|
83
|
+
// The segment carries flexBasis 0 to share the run. A column wrapper would
|
|
84
|
+
// read that as its HEIGHT and resolve the whole frame to the two 1px
|
|
85
|
+
// borders (MPO-133), so the wrapper lays out along the row in BOTH
|
|
86
|
+
// orientations and inherits the segment's place in the run.
|
|
82
87
|
return (
|
|
83
|
-
<View
|
|
88
|
+
<View
|
|
89
|
+
{...elevationWrapperProps}
|
|
90
|
+
{...groupedRadius}
|
|
91
|
+
flexDirection="row"
|
|
92
|
+
flexGrow={1}
|
|
93
|
+
flexShrink={0}
|
|
94
|
+
>
|
|
84
95
|
<ToggleItemFrame {...props} {...groupedRadius} />
|
|
85
96
|
</View>
|
|
86
97
|
);
|
|
@@ -99,6 +110,15 @@ export interface ToggleGroupOption {
|
|
|
99
110
|
* item-level `disabled` without it DEV-warns `bare-disabled`.
|
|
100
111
|
*/
|
|
101
112
|
disabledReason?: string;
|
|
113
|
+
/**
|
|
114
|
+
* MPO-283 — accessible name for THIS segment, overriding `label`. Use it
|
|
115
|
+
* when the segment carries meaning the label text does not: an icon-only
|
|
116
|
+
* segment, or a segment whose state is encoded in fill/weight/position.
|
|
117
|
+
* Native reads it as `accessibilityLabel`, web as `aria-label`.
|
|
118
|
+
*/
|
|
119
|
+
accessibilityLabel?: string;
|
|
120
|
+
/** Extra spoken context for this segment (native `accessibilityHint`). */
|
|
121
|
+
accessibilityHint?: string;
|
|
102
122
|
}
|
|
103
123
|
|
|
104
124
|
export interface ToggleGroupProps {
|
|
@@ -138,6 +158,26 @@ export interface ToggleGroupProps {
|
|
|
138
158
|
skeleton?: boolean;
|
|
139
159
|
/** When true, uses compact sizing */
|
|
140
160
|
compact?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* MPO-283 — accessible name for the whole group.
|
|
163
|
+
*
|
|
164
|
+
* tamagui does not map `aria-label` onto React Native's
|
|
165
|
+
* `accessibilityLabel`, so on native the web attribute is inert; this prop
|
|
166
|
+
* is the native channel and `aria-label` is accepted as an alias for it.
|
|
167
|
+
*
|
|
168
|
+
* iOS only speaks elements, never non-element containers, so a name set
|
|
169
|
+
* here is PREFIXED onto each segment's accessible name ("Severity, warning")
|
|
170
|
+
* rather than sitting on the frame where nothing would read it. Segments
|
|
171
|
+
* stay individually selectable — the group is never collapsed into one
|
|
172
|
+
* element, which would hide which segment is chosen.
|
|
173
|
+
*/
|
|
174
|
+
accessibilityLabel?: string;
|
|
175
|
+
/** Alias for `accessibilityLabel`; also emitted as the web attribute. */
|
|
176
|
+
"aria-label"?: string;
|
|
177
|
+
/** Web-only name reference. Native has no id-based equivalent. */
|
|
178
|
+
"aria-labelledby"?: string;
|
|
179
|
+
/** Extra spoken context for the group (native `accessibilityHint`). */
|
|
180
|
+
accessibilityHint?: string;
|
|
141
181
|
}
|
|
142
182
|
|
|
143
183
|
export function ToggleGroup({
|
|
@@ -165,6 +205,10 @@ export function ToggleGroup({
|
|
|
165
205
|
children,
|
|
166
206
|
skeleton,
|
|
167
207
|
compact,
|
|
208
|
+
accessibilityLabel,
|
|
209
|
+
accessibilityHint,
|
|
210
|
+
"aria-label": ariaLabel,
|
|
211
|
+
"aria-labelledby": ariaLabelledBy,
|
|
168
212
|
}: ToggleGroupProps) {
|
|
169
213
|
// Canonical `onChange` and the alias `onValueChange` both fire from the
|
|
170
214
|
// single emit site below (same reconciliation as Switch).
|
|
@@ -172,6 +216,10 @@ export function ToggleGroup({
|
|
|
172
216
|
onChange?.(val);
|
|
173
217
|
onValueChange?.(val);
|
|
174
218
|
};
|
|
219
|
+
// MPO-283: one name, two channels. tamagui drops `aria-label` on native, so
|
|
220
|
+
// the prop and the attribute are reconciled here and each platform is handed
|
|
221
|
+
// the spelling it actually reads.
|
|
222
|
+
const groupA11yName = accessibilityLabel ?? ariaLabel;
|
|
175
223
|
const { resolvedForm, knobProps, control, text, elevation, disabledState, id } = useFormField({
|
|
176
224
|
form: formProp,
|
|
177
225
|
id: idProp,
|
|
@@ -406,6 +454,25 @@ export function ToggleGroup({
|
|
|
406
454
|
}
|
|
407
455
|
: undefined)}
|
|
408
456
|
{...(kbFocusValue === option.value ? keyboardFocusRingProps : undefined)}
|
|
457
|
+
// MPO-283. On iOS a styled View is not an accessibility element, so
|
|
458
|
+
// without this block the whole segmented control is absent from the
|
|
459
|
+
// tree: correct on screen, invisible to anything reading elements.
|
|
460
|
+
// The SEGMENTS carry the semantics, never the frame — an
|
|
461
|
+
// `accessible` frame would collapse them into one element and lose
|
|
462
|
+
// which one is chosen, which is the only thing worth announcing.
|
|
463
|
+
{...(!isWeb
|
|
464
|
+
? choiceItemA11y({
|
|
465
|
+
kind: type === "multiple" ? "checkbox" : "radio",
|
|
466
|
+
name: composeA11yName(groupA11yName, option.accessibilityLabel ?? option.label),
|
|
467
|
+
selected,
|
|
468
|
+
disabled: itemDisabled,
|
|
469
|
+
hint: option.accessibilityHint ?? accessibilityHint,
|
|
470
|
+
})
|
|
471
|
+
: {
|
|
472
|
+
...(option.accessibilityLabel
|
|
473
|
+
? { "aria-label": option.accessibilityLabel }
|
|
474
|
+
: undefined),
|
|
475
|
+
})}
|
|
409
476
|
>
|
|
410
477
|
{option.icon}
|
|
411
478
|
<SizableText
|
|
@@ -508,6 +575,14 @@ export function ToggleGroup({
|
|
|
508
575
|
"aria-required": required || undefined,
|
|
509
576
|
"aria-invalid": hasError || undefined,
|
|
510
577
|
"aria-readonly": readOnly || undefined,
|
|
578
|
+
// MPO-283: web reads the attribute, Android reads the RN prop off the
|
|
579
|
+
// container. iOS reads neither, which is why the name is also prefixed
|
|
580
|
+
// onto every segment above.
|
|
581
|
+
...(groupA11yName ? { "aria-label": groupA11yName } : undefined),
|
|
582
|
+
...(ariaLabelledBy ? { "aria-labelledby": ariaLabelledBy } : undefined),
|
|
583
|
+
...(!isWeb && groupA11yName
|
|
584
|
+
? { accessibilityLabel: groupA11yName, accessibilityRole: "radiogroup" as const }
|
|
585
|
+
: undefined),
|
|
511
586
|
};
|
|
512
587
|
|
|
513
588
|
return (
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { choiceItemA11y, composeA11yName } from "./nativeA11y";
|
|
3
|
+
|
|
4
|
+
describe("composeA11yName", () => {
|
|
5
|
+
it("returns the option's own name when the group has none", () => {
|
|
6
|
+
expect(composeA11yName(undefined, "warning")).toBe("warning");
|
|
7
|
+
expect(composeA11yName(" ", "warning")).toBe("warning");
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it("puts the group name in front, because iOS never reads a container", () => {
|
|
11
|
+
expect(composeA11yName("Severity", "warning")).toBe("Severity, warning");
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
describe("choiceItemA11y", () => {
|
|
16
|
+
it("carries role, name and both state spellings", () => {
|
|
17
|
+
expect(
|
|
18
|
+
choiceItemA11y({ kind: "radio", name: "DEBITS", selected: true, disabled: false }),
|
|
19
|
+
).toEqual({
|
|
20
|
+
accessible: true,
|
|
21
|
+
role: "button",
|
|
22
|
+
accessibilityRole: "button",
|
|
23
|
+
accessibilityLabel: "DEBITS",
|
|
24
|
+
accessibilityState: { disabled: false, selected: true, checked: true },
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Measured on iOS 26.2 / RN 0.83: a radio or checkbox accessibilityRole
|
|
29
|
+
// takes the element OUT of the tree. `button` is what keeps it in, for both
|
|
30
|
+
// kinds, and `role` must be overridden too because RN prefers it.
|
|
31
|
+
it("pins the platform role to button whatever the control means", () => {
|
|
32
|
+
const checkbox = choiceItemA11y({
|
|
33
|
+
kind: "checkbox",
|
|
34
|
+
name: "error",
|
|
35
|
+
selected: false,
|
|
36
|
+
disabled: true,
|
|
37
|
+
});
|
|
38
|
+
expect(checkbox.role).toBe("button");
|
|
39
|
+
expect(checkbox.accessibilityRole).toBe("button");
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("omits the hint rather than emitting undefined", () => {
|
|
43
|
+
const props = choiceItemA11y({
|
|
44
|
+
kind: "checkbox",
|
|
45
|
+
name: "error",
|
|
46
|
+
selected: false,
|
|
47
|
+
disabled: true,
|
|
48
|
+
});
|
|
49
|
+
expect("accessibilityHint" in props).toBe(false);
|
|
50
|
+
expect(props.accessibilityState).toEqual({ disabled: true, selected: false, checked: false });
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("keeps a hint when one is given", () => {
|
|
54
|
+
expect(
|
|
55
|
+
choiceItemA11y({
|
|
56
|
+
kind: "radio",
|
|
57
|
+
name: "derived",
|
|
58
|
+
selected: false,
|
|
59
|
+
disabled: false,
|
|
60
|
+
hint: "recomputed from other emitters",
|
|
61
|
+
}).accessibilityHint,
|
|
62
|
+
).toBe("recomputed from other emitters");
|
|
63
|
+
});
|
|
64
|
+
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MPO-283 — the accessibility props a choice control needs on React Native.
|
|
3
|
+
*
|
|
4
|
+
* Two things make this necessary rather than decorative. A styled View is not
|
|
5
|
+
* an accessibility element on iOS, so a control that never sets `accessible`
|
|
6
|
+
* is absent from the tree however correctly it draws. And tamagui does not map
|
|
7
|
+
* `aria-*` onto React Native's accessibility props, so every web attribute a
|
|
8
|
+
* component already carries — `aria-label`, `aria-checked`, `role` — is inert
|
|
9
|
+
* on a device.
|
|
10
|
+
*
|
|
11
|
+
* Measured on a Release iphonesimulator build against 7.7.6: RadioGroup's
|
|
12
|
+
* options came back as bare `StaticText`, ToggleGroup contributed nothing at
|
|
13
|
+
* all.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* What the control MEANS: one-of-N, or one of several independent choices.
|
|
18
|
+
* It is not what gets sent to the platform — see `nativeChoiceRole`.
|
|
19
|
+
*/
|
|
20
|
+
export type ChoiceKind = "radio" | "checkbox";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* MEASURED, not chosen. `accessibilityRole: "radio"` (and `"checkbox"`) takes
|
|
24
|
+
* the element OUT of the iOS accessibility tree entirely on RN 0.83 / iOS 26.2
|
|
25
|
+
* — worse than the defect, because at least the sibling label used to be
|
|
26
|
+
* there. `"button"` puts it in, and the selected/checked state rides on
|
|
27
|
+
* `accessibilityState` where a reader actually finds it.
|
|
28
|
+
*
|
|
29
|
+
* tamagui's own RadioGroup.Item already sets `role: "radio"` on native, and RN
|
|
30
|
+
* gives `role` precedence over `accessibilityRole`, so overriding BOTH is what
|
|
31
|
+
* makes the difference. Setting only `accessibilityRole` leaves the element
|
|
32
|
+
* hidden.
|
|
33
|
+
*/
|
|
34
|
+
const nativeChoiceRole = "button" as const;
|
|
35
|
+
|
|
36
|
+
export interface ChoiceA11yProps {
|
|
37
|
+
accessible: true;
|
|
38
|
+
role: typeof nativeChoiceRole;
|
|
39
|
+
accessibilityRole: typeof nativeChoiceRole;
|
|
40
|
+
accessibilityLabel: string;
|
|
41
|
+
accessibilityState: { disabled: boolean; selected: boolean; checked: boolean };
|
|
42
|
+
accessibilityHint?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* iOS speaks elements and never non-element containers, so a group's accessible
|
|
47
|
+
* name cannot sit on the frame — it rides in front of each option's own name.
|
|
48
|
+
* Making the frame `accessible` instead would collapse the options into one
|
|
49
|
+
* element and lose which one is chosen, which is the only thing worth saying.
|
|
50
|
+
*/
|
|
51
|
+
export function composeA11yName(groupName: string | undefined, ownName: string): string {
|
|
52
|
+
const group = groupName?.trim();
|
|
53
|
+
return group ? `${group}, ${ownName}` : ownName;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function choiceItemA11y({
|
|
57
|
+
name,
|
|
58
|
+
selected,
|
|
59
|
+
disabled,
|
|
60
|
+
hint,
|
|
61
|
+
}: {
|
|
62
|
+
/** Kept for the caller's clarity; the platform role is pinned above. */
|
|
63
|
+
kind?: ChoiceKind;
|
|
64
|
+
name: string;
|
|
65
|
+
selected: boolean;
|
|
66
|
+
disabled: boolean;
|
|
67
|
+
hint?: string;
|
|
68
|
+
}): ChoiceA11yProps {
|
|
69
|
+
return {
|
|
70
|
+
accessible: true,
|
|
71
|
+
role: nativeChoiceRole,
|
|
72
|
+
accessibilityRole: nativeChoiceRole,
|
|
73
|
+
accessibilityLabel: name,
|
|
74
|
+
// `selected` is what a reader announces for a segment, `checked` what it
|
|
75
|
+
// announces for a radio; the iOS tree surfaces them as `selected: true`
|
|
76
|
+
// and `value: "checked"`. Both are set so one shape serves both controls.
|
|
77
|
+
accessibilityState: { disabled, selected, checked: selected },
|
|
78
|
+
...(hint ? { accessibilityHint: hint } : undefined),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Button/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAYL,KAAK,gBAAgB,EACrB,KAAK,UAAU,EAEhB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAEL,KAAK,WAAW,IAAI,kBAAkB,EAUvC,MAAM,SAAS,CAAC;AAIjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,cAAc,CAAC;AAM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AAS,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,SAAS,EACjG,cAAc,SAAS,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,SAAS,EAC9E,KAAK,SAAS,SAAS,CAAC,WAAW,EAAE,KAAK,CAAC,GAAG,SAAS,CAAC,WAAW,EAAE,KAAK,CAAC,EAC3E,KAAK,EAAE,eAAe,CAAC,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,KAAK,CAAC,2CAg9BnF;AAED;;;;GAIG;AACH,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawnSet.d.ts","sourceRoot":"","sources":["../../../src/fields/Icon/drawnSet.tsx"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB,sJAiBnB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAI9D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,CAErE;AA8ID,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,aAAa,EAAE,CAI/E;AAED,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,aAAa,EAAE,GAAG,SAAS,CAO9E;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,aAAa,EAAE,EACjC,KAAK,EAAE,MAAM,GACZ,aAAa,EAAE,CAIjB;
|
|
1
|
+
{"version":3,"file":"drawnSet.d.ts","sourceRoot":"","sources":["../../../src/fields/Icon/drawnSet.tsx"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB,sJAiBnB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAI9D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,CAErE;AA8ID,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,aAAa,EAAE,CAI/E;AAED,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,aAAa,EAAE,GAAG,SAAS,CAO9E;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,aAAa,EAAE,EACjC,KAAK,EAAE,MAAM,GACZ,aAAa,EAAE,CAIjB;AA+BD,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,IAAS,EACT,KAAK,GACN,EAAE;IACD,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,2CA0FA"}
|
|
@@ -8,6 +8,14 @@ export interface RadioGroupOption {
|
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
/** Muted secondary line under the label; rendered in `card` mode. */
|
|
10
10
|
description?: string;
|
|
11
|
+
/**
|
|
12
|
+
* MPO-283 — accessible name for THIS option, overriding `label`. Use it
|
|
13
|
+
* when the option carries meaning the label text does not: a glyph, or a
|
|
14
|
+
* state encoded in fill/weight/position rather than words.
|
|
15
|
+
*/
|
|
16
|
+
accessibilityLabel?: string;
|
|
17
|
+
/** Extra spoken context for this option (native `accessibilityHint`). */
|
|
18
|
+
accessibilityHint?: string;
|
|
11
19
|
}
|
|
12
20
|
export interface RadioGroupProps {
|
|
13
21
|
name?: string;
|
|
@@ -52,8 +60,27 @@ export interface RadioGroupProps {
|
|
|
52
60
|
* primitives (same anatomy as `CheckboxGroup card`).
|
|
53
61
|
*/
|
|
54
62
|
card?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* MPO-283 — accessible name for the whole group.
|
|
65
|
+
*
|
|
66
|
+
* tamagui does not map `aria-label` onto React Native's
|
|
67
|
+
* `accessibilityLabel`, so the web attribute is inert on native; this prop
|
|
68
|
+
* is the native channel and `aria-label` is accepted as an alias.
|
|
69
|
+
*
|
|
70
|
+
* iOS speaks elements, never non-element containers, so a name set here is
|
|
71
|
+
* PREFIXED onto each option's accessible name ("Phase, CREDITS") instead of
|
|
72
|
+
* sitting on the frame where nothing reads it. Options stay individually
|
|
73
|
+
* reachable and keep their own checked state.
|
|
74
|
+
*/
|
|
75
|
+
accessibilityLabel?: string;
|
|
76
|
+
/** Alias for `accessibilityLabel`; also emitted as the web attribute. */
|
|
77
|
+
"aria-label"?: string;
|
|
78
|
+
/** Web-only name reference. Native has no id-based equivalent. */
|
|
79
|
+
"aria-labelledby"?: string;
|
|
80
|
+
/** Extra spoken context for the group (native `accessibilityHint`). */
|
|
81
|
+
accessibilityHint?: string;
|
|
55
82
|
}
|
|
56
|
-
export declare function RadioGroup({ name, form: formProp, validators, label, labelProps, helperText, error, required, disabled, readOnly, size, id: idProp, value, defaultValue, onChange, onValueChange, onBlur, options, orientation, radioGroupProps, children, skeleton, compact, card, }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
export declare function RadioGroup({ name, form: formProp, validators, label, labelProps, helperText, error, required, disabled, readOnly, size, id: idProp, value, defaultValue, onChange, onValueChange, onBlur, options, orientation, radioGroupProps, children, skeleton, compact, card, accessibilityLabel, accessibilityHint, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
57
84
|
export declare namespace RadioGroup {
|
|
58
85
|
var Item: import("tamagui").TamaguiComponent<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
59
86
|
disabled?: boolean | undefined;
|