ferns-ui 1.1.1 → 1.2.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/Accordion.js +3 -3
- package/dist/Accordion.js.map +1 -1
- package/dist/ActionSheet.d.ts +1 -9
- package/dist/ActionSheet.js +2 -7
- package/dist/ActionSheet.js.map +1 -1
- package/dist/Avatar.js +3 -3
- package/dist/Avatar.js.map +1 -1
- package/dist/Banner.js +1 -1
- package/dist/Banner.js.map +1 -1
- package/dist/BooleanField.js +1 -1
- package/dist/BooleanField.js.map +1 -1
- package/dist/Box.js +2 -10
- package/dist/Box.js.map +1 -1
- package/dist/Button.js +1 -1
- package/dist/Button.js.map +1 -1
- package/dist/CheckBox.js +1 -1
- package/dist/CheckBox.js.map +1 -1
- package/dist/Common.d.ts +8 -7
- package/dist/Common.js.map +1 -1
- package/dist/CustomSelectField.js +3 -3
- package/dist/CustomSelectField.js.map +1 -1
- package/dist/DateTimeActionSheet.js +10 -6
- package/dist/DateTimeActionSheet.js.map +1 -1
- package/dist/DateTimeField.js +1 -1
- package/dist/DateTimeField.js.map +1 -1
- package/dist/DateUtilities.js +9 -9
- package/dist/DateUtilities.js.map +1 -1
- package/dist/DismissButton.js +1 -1
- package/dist/DismissButton.js.map +1 -1
- package/dist/Icon.js +1 -1
- package/dist/Icon.js.map +1 -1
- package/dist/IconButton.js +2 -2
- package/dist/IconButton.js.map +1 -1
- package/dist/Link.js +1 -1
- package/dist/Link.js.map +1 -1
- package/dist/MobileAddressAutoComplete.js +1 -1
- package/dist/MobileAddressAutoComplete.js.map +1 -1
- package/dist/Modal.js +7 -13
- package/dist/Modal.js.map +1 -1
- package/dist/MultiselectField.js +2 -2
- package/dist/MultiselectField.js.map +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/Pagination.js.map +1 -1
- package/dist/PickerSelect.js +4 -4
- package/dist/PickerSelect.js.map +1 -1
- package/dist/RadioField.js +1 -1
- package/dist/RadioField.js.map +1 -1
- package/dist/SegmentedControl.js +1 -1
- package/dist/SegmentedControl.js.map +1 -1
- package/dist/Text.js +1 -1
- package/dist/Text.js.map +1 -1
- package/dist/TextField.js +9 -21
- package/dist/TextField.js.map +1 -1
- package/dist/Toast.js +1 -1
- package/dist/Toast.js.map +1 -1
- package/dist/Tooltip.js +1 -1
- package/dist/Tooltip.js.map +1 -1
- package/dist/Unifier.d.ts +0 -1
- package/dist/Unifier.js +6 -7
- package/dist/Unifier.js.map +1 -1
- package/dist/table/TableBoolean.js +2 -2
- package/dist/table/TableBoolean.js.map +1 -1
- package/dist/table/TableHeaderCell.js +1 -1
- package/dist/table/TableHeaderCell.js.map +1 -1
- package/dist/table/TableTitle.js +1 -1
- package/dist/table/TableTitle.js.map +1 -1
- package/package.json +2 -1
- package/src/Accordion.tsx +3 -2
- package/src/ActionSheet.tsx +2 -7
- package/src/Avatar.tsx +4 -4
- package/src/Banner.tsx +2 -2
- package/src/BooleanField.tsx +10 -4
- package/src/Box.tsx +3 -11
- package/src/Button.tsx +2 -2
- package/src/CheckBox.tsx +1 -1
- package/src/Common.ts +12 -11
- package/src/CustomSelectField.tsx +5 -5
- package/src/DateTimeActionSheet.tsx +12 -6
- package/src/DateTimeField.tsx +1 -1
- package/src/DateUtilities.tsx +11 -13
- package/src/DismissButton.tsx +2 -2
- package/src/Icon.tsx +1 -0
- package/src/IconButton.tsx +3 -2
- package/src/Link.tsx +2 -2
- package/src/MobileAddressAutoComplete.tsx +1 -1
- package/src/Modal.tsx +12 -18
- package/src/MultiselectField.tsx +4 -4
- package/src/Pagination.tsx +1 -1
- package/src/PickerSelect.tsx +4 -4
- package/src/RadioField.tsx +2 -2
- package/src/SegmentedControl.tsx +1 -1
- package/src/Text.tsx +1 -1
- package/src/TextField.tsx +9 -20
- package/src/Toast.tsx +1 -1
- package/src/Tooltip.tsx +2 -2
- package/src/Unifier.ts +0 -4
- package/src/table/TableBoolean.tsx +4 -4
- package/src/table/TableHeaderCell.tsx +1 -0
- package/src/table/TableTitle.tsx +2 -2
|
@@ -70,16 +70,16 @@ export const CustomSelectField = ({
|
|
|
70
70
|
return (
|
|
71
71
|
<View
|
|
72
72
|
accessibilityHint="Select an option or input a custom value"
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
aria-label="Select dropdown with popup text input field"
|
|
74
|
+
aria-role="combobox"
|
|
75
75
|
style={{
|
|
76
76
|
width: "100%",
|
|
77
77
|
}}
|
|
78
78
|
>
|
|
79
79
|
<View
|
|
80
80
|
accessibilityHint="Opens a dropdown menu. Select an option, or select custom to trigger popup to input a custom value"
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
aria-label="Select dropdown"
|
|
82
|
+
aria-role="button"
|
|
83
83
|
>
|
|
84
84
|
<SelectField
|
|
85
85
|
disabled={disabled}
|
|
@@ -94,7 +94,7 @@ export const CustomSelectField = ({
|
|
|
94
94
|
{Boolean(showCustomInput) && (
|
|
95
95
|
<View
|
|
96
96
|
accessibilityHint="Enter a custom value or go back to select a provided option."
|
|
97
|
-
|
|
97
|
+
aria-label="Custom value input field"
|
|
98
98
|
style={{
|
|
99
99
|
paddingVertical: 16,
|
|
100
100
|
}}
|
|
@@ -78,7 +78,7 @@ const TimeInput = ({
|
|
|
78
78
|
>
|
|
79
79
|
<TextInput
|
|
80
80
|
accessibilityHint="Enter a number"
|
|
81
|
-
|
|
81
|
+
aria-label="Text input field"
|
|
82
82
|
enterKeyHint="done"
|
|
83
83
|
keyboardType="number-pad"
|
|
84
84
|
style={
|
|
@@ -120,12 +120,12 @@ const CalendarButton = ({
|
|
|
120
120
|
return (
|
|
121
121
|
<Pressable
|
|
122
122
|
accessibilityHint={accessibilityHint}
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
aria-label={accessibilityLabel}
|
|
124
|
+
aria-role="button"
|
|
125
125
|
hitSlop={10}
|
|
126
126
|
onPress={onClick}
|
|
127
127
|
>
|
|
128
|
-
<FontAwesome6 color={theme.surface.secondaryDark} name={iconName} size={16} />
|
|
128
|
+
<FontAwesome6 color={theme.surface.secondaryDark} name={iconName} size={16} selectable={undefined} />
|
|
129
129
|
</Pressable>
|
|
130
130
|
);
|
|
131
131
|
};
|
|
@@ -325,9 +325,11 @@ const DateCalendar = ({
|
|
|
325
325
|
onDismiss,
|
|
326
326
|
date,
|
|
327
327
|
setDate,
|
|
328
|
+
timezone,
|
|
328
329
|
}: {
|
|
329
330
|
type: DateTimeActionSheetProps["type"];
|
|
330
331
|
date: string;
|
|
332
|
+
timezone: string | undefined;
|
|
331
333
|
setDate: (date: string) => void;
|
|
332
334
|
onChange: DateTimeActionSheetProps["onChange"];
|
|
333
335
|
onDismiss: DateTimeActionSheetProps["onDismiss"];
|
|
@@ -349,7 +351,10 @@ const DateCalendar = ({
|
|
|
349
351
|
}
|
|
350
352
|
|
|
351
353
|
if (date) {
|
|
352
|
-
|
|
354
|
+
const displayDate = timezone
|
|
355
|
+
? DateTime.fromISO(dateString).setZone(timezone).toFormat("yyyy-MM-dd")
|
|
356
|
+
: DateTime.fromISO(dateString).toFormat("yyyy-MM-dd");
|
|
357
|
+
markedDates[displayDate] = {
|
|
353
358
|
selected: true,
|
|
354
359
|
selectedColor: theme.text.primary,
|
|
355
360
|
customStyles: {
|
|
@@ -503,11 +508,12 @@ export const DateTimeActionSheet = ({
|
|
|
503
508
|
() => ({
|
|
504
509
|
date,
|
|
505
510
|
type,
|
|
511
|
+
timezone,
|
|
506
512
|
setDate,
|
|
507
513
|
onChange,
|
|
508
514
|
onDismiss,
|
|
509
515
|
}),
|
|
510
|
-
[date, type, setDate, onChange, onDismiss]
|
|
516
|
+
[date, type, setDate, onChange, onDismiss, timezone]
|
|
511
517
|
);
|
|
512
518
|
|
|
513
519
|
const timeProps = useMemo(
|
package/src/DateTimeField.tsx
CHANGED
package/src/DateUtilities.tsx
CHANGED
|
@@ -134,8 +134,6 @@ export const printDate = (
|
|
|
134
134
|
}: {
|
|
135
135
|
timezone?: string;
|
|
136
136
|
showTimezone?: boolean;
|
|
137
|
-
// Ignore the time in the date, treat as a date in timezone.
|
|
138
|
-
// Will log a warning if the time is not set to midnight UTC.
|
|
139
137
|
ignoreTime?: boolean;
|
|
140
138
|
defaultValue?: string;
|
|
141
139
|
} = {}
|
|
@@ -147,23 +145,23 @@ export const printDate = (
|
|
|
147
145
|
console.warn("showTimezone is not supported for printDate");
|
|
148
146
|
}
|
|
149
147
|
|
|
148
|
+
if (ignoreTime) {
|
|
149
|
+
// Parse the date in the specified timezone (or local if not provided)
|
|
150
|
+
// then force to UTC midnight to ignore time component
|
|
151
|
+
const justDate = timezone
|
|
152
|
+
? DateTime.fromISO(date).setZone(timezone)
|
|
153
|
+
: DateTime.fromISO(date).setZone("UTC");
|
|
154
|
+
// Using startOf('day') to normalize the time component
|
|
155
|
+
return justDate.startOf("day").toFormat("M/d/yyyy");
|
|
156
|
+
}
|
|
157
|
+
|
|
150
158
|
let clonedDate;
|
|
151
159
|
try {
|
|
152
|
-
clonedDate = getDate(date
|
|
160
|
+
clonedDate = getDate(date, {timezone});
|
|
153
161
|
} catch (error: any) {
|
|
154
162
|
throw new Error(`printDate: ${error.message}`);
|
|
155
163
|
}
|
|
156
164
|
|
|
157
|
-
if (ignoreTime) {
|
|
158
|
-
if (!date) {
|
|
159
|
-
throw new Error("printDate: Passed undefined");
|
|
160
|
-
}
|
|
161
|
-
// Use only the date component, ignore the time.
|
|
162
|
-
const justDate = DateTime.fromISO(date);
|
|
163
|
-
// We force it into UTC so we can get the correct date.
|
|
164
|
-
return justDate.setZone("UTC").toFormat("M/d/yyyy");
|
|
165
|
-
}
|
|
166
|
-
|
|
167
165
|
return clonedDate.toLocaleString(DateTime.DATE_SHORT);
|
|
168
166
|
};
|
|
169
167
|
|
package/src/DismissButton.tsx
CHANGED
|
@@ -13,8 +13,8 @@ export const DismissButton = ({
|
|
|
13
13
|
return (
|
|
14
14
|
<Pressable
|
|
15
15
|
accessibilityHint={accessibilityHint}
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
aria-label={accessibilityLabel}
|
|
17
|
+
aria-role="button"
|
|
18
18
|
style={{
|
|
19
19
|
alignItems: "center",
|
|
20
20
|
justifyContent: "center",
|
package/src/Icon.tsx
CHANGED
package/src/IconButton.tsx
CHANGED
|
@@ -98,8 +98,8 @@ const IconButtonComponent: FC<IconButtonProps> = ({
|
|
|
98
98
|
? `Opens a confirmation dialog to confirm ${accessLabel}`
|
|
99
99
|
: `Press to perform ${accessLabel} action`
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
aria-label={accessLabel}
|
|
102
|
+
aria-role="button"
|
|
103
103
|
disabled={loading}
|
|
104
104
|
style={{
|
|
105
105
|
alignItems: "center",
|
|
@@ -136,6 +136,7 @@ const IconButtonComponent: FC<IconButtonProps> = ({
|
|
|
136
136
|
<FontAwesome6
|
|
137
137
|
color={color}
|
|
138
138
|
name={iconName}
|
|
139
|
+
selectable={undefined}
|
|
139
140
|
size={variant === "navigation" ? 20 : 16}
|
|
140
141
|
solid
|
|
141
142
|
/>
|
package/src/Link.tsx
CHANGED
|
@@ -10,9 +10,9 @@ export const Link = ({text, href, onClick}: LinkProps): React.ReactElement => {
|
|
|
10
10
|
}
|
|
11
11
|
return (
|
|
12
12
|
<Pressable
|
|
13
|
-
|
|
13
|
+
aria-role="button"
|
|
14
14
|
hitSlop={20}
|
|
15
|
-
onPress={() => (onClick ? onClick() : Linking.openURL(href))}
|
|
15
|
+
onPress={() => (onClick ? onClick() : href && Linking.openURL(href))}
|
|
16
16
|
>
|
|
17
17
|
<Text color="link" underline>
|
|
18
18
|
{text}
|
package/src/Modal.tsx
CHANGED
|
@@ -72,13 +72,7 @@ const ModalContent: FC<{
|
|
|
72
72
|
...(isMobile
|
|
73
73
|
? {}
|
|
74
74
|
: {
|
|
75
|
-
|
|
76
|
-
shadowOffset: {
|
|
77
|
-
width: 0,
|
|
78
|
-
height: 4,
|
|
79
|
-
},
|
|
80
|
-
shadowOpacity: 0.5,
|
|
81
|
-
shadowRadius: 24,
|
|
75
|
+
boxShadow: "0px 4px 24px rgba(0, 0, 0, 0.5)",
|
|
82
76
|
elevation: 24,
|
|
83
77
|
}),
|
|
84
78
|
}}
|
|
@@ -86,8 +80,8 @@ const ModalContent: FC<{
|
|
|
86
80
|
<View style={{alignSelf: "flex-end", position: "relative"}}>
|
|
87
81
|
<Pressable
|
|
88
82
|
accessibilityHint="Closes the modal"
|
|
89
|
-
|
|
90
|
-
|
|
83
|
+
aria-label="Close modal"
|
|
84
|
+
aria-role="button"
|
|
91
85
|
style={{
|
|
92
86
|
flex: 1,
|
|
93
87
|
justifyContent: "center",
|
|
@@ -106,8 +100,8 @@ const ModalContent: FC<{
|
|
|
106
100
|
{title && (
|
|
107
101
|
<View
|
|
108
102
|
accessibilityHint="Modal title"
|
|
109
|
-
|
|
110
|
-
|
|
103
|
+
aria-label={title}
|
|
104
|
+
aria-role="header"
|
|
111
105
|
style={{alignSelf: "flex-start"}}
|
|
112
106
|
>
|
|
113
107
|
<Heading size="lg">{title}</Heading>
|
|
@@ -116,8 +110,8 @@ const ModalContent: FC<{
|
|
|
116
110
|
{subtitle && (
|
|
117
111
|
<View
|
|
118
112
|
accessibilityHint="Modal Sub Heading Text"
|
|
119
|
-
|
|
120
|
-
|
|
113
|
+
aria-label={subtitle}
|
|
114
|
+
aria-role="text"
|
|
121
115
|
style={{alignSelf: "flex-start", marginTop: subtitle ? 8 : 0}}
|
|
122
116
|
>
|
|
123
117
|
<Text size="lg">{subtitle}</Text>
|
|
@@ -126,15 +120,15 @@ const ModalContent: FC<{
|
|
|
126
120
|
{text && (
|
|
127
121
|
<View
|
|
128
122
|
accessibilityHint="Modal body text"
|
|
129
|
-
|
|
130
|
-
|
|
123
|
+
aria-label={text}
|
|
124
|
+
aria-role="text"
|
|
131
125
|
style={{marginVertical: text ? 12 : 0, alignSelf: "flex-start"}}
|
|
132
126
|
>
|
|
133
127
|
<Text>{text}</Text>
|
|
134
128
|
</View>
|
|
135
129
|
)}
|
|
136
130
|
{children && (
|
|
137
|
-
<View
|
|
131
|
+
<View aria-role="text" style={{marginTop: text ? 0 : 12}}>
|
|
138
132
|
{children}
|
|
139
133
|
</View>
|
|
140
134
|
)}
|
|
@@ -221,8 +215,8 @@ export const Modal: FC<ModalProps> = ({
|
|
|
221
215
|
<View>
|
|
222
216
|
<View
|
|
223
217
|
accessibilityHint="Pull down to close the modal"
|
|
224
|
-
|
|
225
|
-
|
|
218
|
+
aria-label="Pull down bar"
|
|
219
|
+
aria-role="adjustable"
|
|
226
220
|
style={{
|
|
227
221
|
justifyContent: "center",
|
|
228
222
|
alignItems: "center",
|
package/src/MultiselectField.tsx
CHANGED
|
@@ -31,8 +31,8 @@ const Option: FC<OptionProps> = ({value, label, isDefault, selected, onSelect})
|
|
|
31
31
|
<TouchableOpacity
|
|
32
32
|
key={value}
|
|
33
33
|
accessibilityHint={`Select ${label ?? value} from list of options`}
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
aria-label={label ?? value}
|
|
35
|
+
aria-role="checkbox"
|
|
36
36
|
hitSlop={{top: 10, bottom: 10, left: 10, right: 10}}
|
|
37
37
|
style={{
|
|
38
38
|
justifyContent: "center",
|
|
@@ -80,8 +80,8 @@ export const MultiselectField: FC<MultiselectFieldProps> = ({
|
|
|
80
80
|
return (
|
|
81
81
|
<View
|
|
82
82
|
accessibilityHint="Contains a prompt and list of options to select"
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
aria-label={title}
|
|
84
|
+
aria-role="combobox"
|
|
85
85
|
style={{
|
|
86
86
|
display: "flex",
|
|
87
87
|
width: "100%",
|
package/src/Pagination.tsx
CHANGED
package/src/PickerSelect.tsx
CHANGED
|
@@ -253,8 +253,8 @@ export function RNPickerSelect({
|
|
|
253
253
|
>
|
|
254
254
|
{Boolean(onUpArrow) && (
|
|
255
255
|
<TouchableOpacity
|
|
256
|
-
accessibilityRole="button"
|
|
257
256
|
activeOpacity={onUpArrow ? 0.5 : 1}
|
|
257
|
+
aria-role="button"
|
|
258
258
|
onPress={onUpArrow ? onUpArrowEvent : undefined}
|
|
259
259
|
>
|
|
260
260
|
<View
|
|
@@ -272,8 +272,8 @@ export function RNPickerSelect({
|
|
|
272
272
|
)}
|
|
273
273
|
{Boolean(onDownArrow) && (
|
|
274
274
|
<TouchableOpacity
|
|
275
|
-
accessibilityRole="button"
|
|
276
275
|
activeOpacity={onDownArrow ? 0.5 : 1}
|
|
276
|
+
aria-role="button"
|
|
277
277
|
onPress={onDownArrow ? onDownArrowEvent : undefined}
|
|
278
278
|
>
|
|
279
279
|
<View
|
|
@@ -359,7 +359,7 @@ export function RNPickerSelect({
|
|
|
359
359
|
}}
|
|
360
360
|
>
|
|
361
361
|
<TextInput
|
|
362
|
-
|
|
362
|
+
readOnly
|
|
363
363
|
style={{color: disabled ? theme.text.secondaryLight : theme.text.primary}}
|
|
364
364
|
testID="text_input"
|
|
365
365
|
value={selectedItem?.inputLabel ? selectedItem?.inputLabel : selectedItem?.label}
|
|
@@ -411,7 +411,7 @@ export function RNPickerSelect({
|
|
|
411
411
|
{...modalProps}
|
|
412
412
|
>
|
|
413
413
|
<Pressable
|
|
414
|
-
|
|
414
|
+
aria-role="button"
|
|
415
415
|
style={{
|
|
416
416
|
flex: 1,
|
|
417
417
|
}}
|
package/src/RadioField.tsx
CHANGED
|
@@ -21,8 +21,8 @@ export const RadioField = ({
|
|
|
21
21
|
<TouchableOpacity
|
|
22
22
|
key={option.key ?? option.value}
|
|
23
23
|
accessibilityHint={`Select ${option} from list of options`}
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
aria-label={option.label ?? option.value}
|
|
25
|
+
aria-role="button"
|
|
26
26
|
style={{
|
|
27
27
|
flexDirection: "row",
|
|
28
28
|
justifyContent: "space-between",
|
package/src/SegmentedControl.tsx
CHANGED
package/src/Text.tsx
CHANGED
|
@@ -105,7 +105,7 @@ export const Text = ({
|
|
|
105
105
|
lines = 1;
|
|
106
106
|
}
|
|
107
107
|
const inner = (
|
|
108
|
-
<NativeText numberOfLines={lines} style={style} testID={testID}>
|
|
108
|
+
<NativeText numberOfLines={lines} selectable={undefined} style={style} testID={testID}>
|
|
109
109
|
{children}
|
|
110
110
|
</NativeText>
|
|
111
111
|
);
|
package/src/TextField.tsx
CHANGED
|
@@ -89,23 +89,12 @@ export const TextField: FC<TextFieldProps> = ({
|
|
|
89
89
|
const [focused, setFocused] = useState(false);
|
|
90
90
|
const [height, setHeight] = useState(rows * 40);
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return focused ? theme.border.focus : theme.border.dark;
|
|
99
|
-
}
|
|
100
|
-
}, [
|
|
101
|
-
disabled,
|
|
102
|
-
errorText,
|
|
103
|
-
focused,
|
|
104
|
-
theme.border.activeNeutral,
|
|
105
|
-
theme.border.dark,
|
|
106
|
-
theme.border.error,
|
|
107
|
-
theme.border.focus,
|
|
108
|
-
]);
|
|
92
|
+
let borderColor = focused ? theme.border.focus : theme.border.dark;
|
|
93
|
+
if (disabled) {
|
|
94
|
+
borderColor = theme.border.activeNeutral;
|
|
95
|
+
} else if (errorText) {
|
|
96
|
+
borderColor = theme.border.error;
|
|
97
|
+
}
|
|
109
98
|
|
|
110
99
|
const calculatedHeight: DimensionValue = useMemo(() => {
|
|
111
100
|
if (grow) {
|
|
@@ -174,18 +163,18 @@ export const TextField: FC<TextFieldProps> = ({
|
|
|
174
163
|
}
|
|
175
164
|
}}
|
|
176
165
|
accessibilityHint="Enter text here"
|
|
177
|
-
accessibilityLabel="Text input field"
|
|
178
166
|
accessibilityState={{disabled}}
|
|
167
|
+
aria-label="Text input field"
|
|
179
168
|
autoCapitalize={type === "text" ? "sentences" : "none"}
|
|
180
169
|
autoCorrect={shouldAutocorrect}
|
|
181
170
|
blurOnSubmit={blurOnSubmit}
|
|
182
|
-
editable={!disabled}
|
|
183
171
|
enterKeyHint={returnKeyType}
|
|
184
172
|
keyboardType={keyboardType as KeyboardTypeOptions}
|
|
185
173
|
multiline={multiline}
|
|
186
174
|
numberOfLines={rows || 4}
|
|
187
175
|
placeholder={placeholder}
|
|
188
176
|
placeholderTextColor={theme.text.secondaryLight}
|
|
177
|
+
readOnly={disabled}
|
|
189
178
|
secureTextEntry={type === "password"}
|
|
190
179
|
style={defaultTextInputStyles}
|
|
191
180
|
testID={testID}
|
|
@@ -224,7 +213,7 @@ export const TextField: FC<TextFieldProps> = ({
|
|
|
224
213
|
}}
|
|
225
214
|
/>
|
|
226
215
|
{Boolean(iconName) && (
|
|
227
|
-
<Pressable
|
|
216
|
+
<Pressable aria-role="button" onPress={onIconClick}>
|
|
228
217
|
<Icon iconName={iconName!} size="md" />
|
|
229
218
|
</Pressable>
|
|
230
219
|
)}
|
package/src/Toast.tsx
CHANGED
package/src/Tooltip.tsx
CHANGED
|
@@ -339,8 +339,8 @@ export const Tooltip: FC<TooltipProps> = ({text, children, idealPosition, includ
|
|
|
339
339
|
>
|
|
340
340
|
<Pressable
|
|
341
341
|
accessibilityHint="Tooltip information"
|
|
342
|
-
|
|
343
|
-
|
|
342
|
+
aria-label={text}
|
|
343
|
+
aria-role="button"
|
|
344
344
|
style={{
|
|
345
345
|
backgroundColor: theme.surface.secondaryExtraDark,
|
|
346
346
|
borderRadius: theme.radius.default,
|
package/src/Unifier.ts
CHANGED
|
@@ -24,8 +24,8 @@ export const TableBoolean: FC<TableBooleanProps> = ({value, isEditing = false})
|
|
|
24
24
|
return (
|
|
25
25
|
<TouchableOpacity
|
|
26
26
|
accessibilityHint={`Tap to change the checkbox from ${oppositeValueString} to ${valueString}`}
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
aria-label={`Checkbox is currently ${valueString}`}
|
|
28
|
+
aria-role="checkbox"
|
|
29
29
|
hitSlop={{top: 10, bottom: 10, left: 10, right: 10}}
|
|
30
30
|
style={
|
|
31
31
|
{
|
|
@@ -49,8 +49,8 @@ export const TableBoolean: FC<TableBooleanProps> = ({value, isEditing = false})
|
|
|
49
49
|
>
|
|
50
50
|
<View
|
|
51
51
|
accessibilityHint={value ? "Checked icon" : "Unchecked icon"}
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
aria-label={`The checkbox is ${valueString}`}
|
|
53
|
+
aria-role="image"
|
|
54
54
|
style={{
|
|
55
55
|
height: 32,
|
|
56
56
|
width: 32,
|
package/src/table/TableTitle.tsx
CHANGED
|
@@ -10,8 +10,8 @@ export const TableTitle: FC<TableTitleProps> = ({title, align = "left"}) => {
|
|
|
10
10
|
// No hint needed for a title.
|
|
11
11
|
// eslint-disable-next-line react-native-a11y/has-accessibility-hint
|
|
12
12
|
<Text
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
aria-label={`Table title: ${title}`}
|
|
14
|
+
aria-role="header"
|
|
15
15
|
ellipsizeMode="tail" // ensures that the text is clipped at the end of the line for all platforms
|
|
16
16
|
numberOfLines={3}
|
|
17
17
|
style={{
|