Skip to content

Commit af5b264

Browse files
committed
Merge branch 'main' into collectioneur/dynamic-routes-wildcard-access
2 parents 56abfc4 + bf4826c commit af5b264

49 files changed

Lines changed: 648 additions & 106 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Mobile-Expensify

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ android {
111111
minSdkVersion rootProject.ext.minSdkVersion
112112
targetSdkVersion rootProject.ext.targetSdkVersion
113113
multiDexEnabled rootProject.ext.multiDexEnabled
114-
versionCode 1009034102
115-
versionName "9.3.41-2"
114+
versionCode 1009034103
115+
versionName "9.3.41-3"
116116
// Supported language variants must be declared here to avoid from being removed during the compilation.
117117
// This also helps us to not include unnecessary language variants in the APK.
118118
resConfigs "en", "es"

ios/NewExpensify/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</dict>
4545
</array>
4646
<key>CFBundleVersion</key>
47-
<string>9.3.41.2</string>
47+
<string>9.3.41.3</string>
4848
<key>FullStory</key>
4949
<dict>
5050
<key>OrgId</key>

ios/NotificationServiceExtension/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.3.41</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.3.41.2</string>
16+
<string>9.3.41.3</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionPointIdentifier</key>

ios/ShareViewController/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.3.41</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.3.41.2</string>
16+
<string>9.3.41.3</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionAttributes</key>

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "new.expensify",
3-
"version": "9.3.41-2",
3+
"version": "9.3.41-3",
44
"author": "Expensify, Inc.",
55
"homepage": "https://new.expensify.com",
66
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",

src/CONST/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8290,9 +8290,6 @@ const CONST = {
82908290
SIGN_UP: 'sign_up',
82918291
WORKSPACE_CREATED: 'workspace_created',
82928292
PAID_ADOPTION: 'paid_adoption',
8293-
PRODUCT_TRAINING_SCAN_TEST_TOOLTIP_SHOWN: 'product_training_scan_test_tooltip_shown',
8294-
PRODUCT_TRAINING_SCAN_TEST_TOOLTIP_DISMISSED: 'product_training_scan_test_tooltip_dismissed',
8295-
PRODUCT_TRAINING_SCAN_TEST_TOOLTIP_CONFIRMED: 'product_training_scan_test_tooltip_confirmed',
82968293
},
82978294
},
82988295

src/components/Picker/BasePicker.tsx

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import useThemeStyles from '@hooks/useThemeStyles';
1616
import {isMobile} from '@libs/Browser';
1717
import getOperatingSystem from '@libs/getOperatingSystem';
1818
import CONST from '@src/CONST';
19+
import getAccessibilityLabelConfig from './getAccessibilityLabelConfig';
1920
import type {BasePickerProps} from './types';
2021

2122
type IconToRender = () => ReactElement;
@@ -46,7 +47,7 @@ function BasePicker<TPickerValue>({
4647
const {translate} = useLocalize();
4748
const theme = useTheme();
4849
const styles = useThemeStyles();
49-
50+
const {shouldAnnounceSelectedLabel, shouldUseCustomAccessibilityLabel} = getAccessibilityLabelConfig();
5051
const [isHighlighted, setIsHighlighted] = useState(false);
5152

5253
// reference to the root View
@@ -166,6 +167,19 @@ function BasePicker<TPickerValue>({
166167
// Disable Tab focus on mobile to prevent soft keyboard navigation jumping to picker (#25759)
167168
const pickerTabIndex = isMobile() ? -1 : 0;
168169

170+
const selectedItem = items.find((item) => item.value === value);
171+
const selectedLabel = selectedItem?.label ?? '';
172+
const defaultAccessibilityLabel = accessibilityLabel ?? label ?? selectedLabel;
173+
const enhancedAccessibilityLabel = useMemo(() => {
174+
if (!defaultAccessibilityLabel) {
175+
return selectedLabel || '';
176+
}
177+
if (selectedLabel) {
178+
return `${defaultAccessibilityLabel}${shouldAnnounceSelectedLabel ? `, ${selectedLabel}` : ''}, ${translate(isHighlighted ? 'common.expanded' : 'common.collapsed')}`;
179+
}
180+
return defaultAccessibilityLabel;
181+
}, [defaultAccessibilityLabel, selectedLabel, shouldAnnounceSelectedLabel, translate, isHighlighted]);
182+
169183
if (isDisabled && shouldShowOnlyTextWhenDisabled) {
170184
return (
171185
<View>
@@ -183,6 +197,8 @@ function BasePicker<TPickerValue>({
183197
);
184198
}
185199

200+
const actualAccessibilityLabel = shouldUseCustomAccessibilityLabel ? enhancedAccessibilityLabel : defaultAccessibilityLabel;
201+
186202
return (
187203
<>
188204
<View
@@ -211,6 +227,8 @@ function BasePicker<TPickerValue>({
211227
onClose={disableHighlight}
212228
textInputProps={{
213229
allowFontScaling: false,
230+
accessibilityRole: CONST.ROLE.COMBOBOX,
231+
accessibilityLabel: actualAccessibilityLabel,
214232
importantForAccessibility: 'no-hide-descendants',
215233
}}
216234
touchableDoneProps={{
@@ -220,8 +238,7 @@ function BasePicker<TPickerValue>({
220238
touchableWrapperProps={{
221239
accessible: true,
222240
accessibilityRole: CONST.ROLE.COMBOBOX,
223-
accessibilityLabel,
224-
accessibilityState: {disabled: isDisabled, expanded: isHighlighted},
241+
accessibilityLabel: actualAccessibilityLabel,
225242
}}
226243
pickerProps={{
227244
ref: picker,
@@ -231,7 +248,8 @@ function BasePicker<TPickerValue>({
231248
disableHighlight();
232249
onBlur();
233250
},
234-
accessibilityLabel,
251+
accessibilityLabel: actualAccessibilityLabel,
252+
accessibilityRole: CONST.ROLE.COMBOBOX,
235253
...additionalPickerEvents(enableHighlight, (inputValue, index) => {
236254
onValueChange(inputValue, index);
237255
disableHighlight();
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const getAccessibilityLabelConfig = () => {
2+
return {
3+
shouldAnnounceSelectedLabel: true,
4+
shouldUseCustomAccessibilityLabel: true,
5+
};
6+
};
7+
8+
export default getAccessibilityLabelConfig;

0 commit comments

Comments
 (0)