snapshot 1`] = `
aria-live="polite"
aria-relevant="additions text"
class="emotion-1"
+ role="log"
/>
snapshot 1`] = `
data-value=""
>
+
+function testPlatform(re: RegExp) {
+ return typeof window !== 'undefined' && window.navigator != null
+ ? re.test(
+ window.navigator['userAgentData']?.platform || window.navigator.platform
+ )
+ : false;
+}
+
+export function isIPhone() {
+ return testPlatform(/^iPhone/i);
+}
+
+export function isMac() {
+ return testPlatform(/^Mac/i);
+}
+
+export function isIPad() {
+ return (
+ testPlatform(/^iPad/i) ||
+ // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
+ (isMac() && navigator.maxTouchPoints > 1)
+ );
+}
+
+export function isIOS() {
+ return isIPhone() || isIPad();
+}
+
+export function isAppleDevice() {
+ return isMac() || isIOS();
+}
diff --git a/packages/react-select/src/accessibility/index.ts b/packages/react-select/src/accessibility/index.ts
index 637783ed48..0a29be42c0 100644
--- a/packages/react-select/src/accessibility/index.ts
+++ b/packages/react-select/src/accessibility/index.ts
@@ -33,6 +33,8 @@ export interface AriaGuidanceProps {
isDisabled: boolean | null;
/** Boolean value of selectProp tabSelectsValue */
tabSelectsValue: boolean;
+ /** Boolean value indicating if user focused the input for the first time */
+ isInitialFocus: boolean;
}
export type AriaOnChangeProps
diff --git a/packages/react-select/src/components/LiveRegion.tsx b/packages/react-select/src/components/LiveRegion.tsx
index f85db69a04..ac78e79e0e 100644
--- a/packages/react-select/src/components/LiveRegion.tsx
+++ b/packages/react-select/src/components/LiveRegion.tsx
@@ -25,6 +25,7 @@ export interface LiveRegionProps<
focusableOptions: Options