@fluentui/react-aria 9.13.13 → 9.14.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,12 +1,36 @@
1
1
  # Change Log - @fluentui/react-aria
2
2
 
3
- This log was last generated on Wed, 08 Jan 2025 18:29:15 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 21 Feb 2025 14:30:46 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.14.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-aria_v9.14.0)
8
+
9
+ Fri, 21 Feb 2025 14:30:46 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-aria_v9.13.14..@fluentui/react-aria_v9.14.0)
11
+
12
+ ### Minor changes
13
+
14
+ - Bump @fluentui/react-tabster to v9.24.0 ([PR #33876](https://github.com/microsoft/fluentui/pull/33876) by beachball)
15
+
16
+ ### Patches
17
+
18
+ - fix: useAnnounce live regions do not get aria-hidden from tabster ([PR #33855](https://github.com/microsoft/fluentui/pull/33855) by sarah.higley@microsoft.com)
19
+
20
+ ## [9.13.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-aria_v9.13.14)
21
+
22
+ Wed, 22 Jan 2025 14:00:14 GMT
23
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-aria_v9.13.13..@fluentui/react-aria_v9.13.14)
24
+
25
+ ### Patches
26
+
27
+ - Bump @fluentui/react-jsx-runtime to v9.0.50 ([PR #33631](https://github.com/microsoft/fluentui/pull/33631) by beachball)
28
+ - Bump @fluentui/react-tabster to v9.23.3 ([PR #33631](https://github.com/microsoft/fluentui/pull/33631) by beachball)
29
+ - Bump @fluentui/react-utilities to v9.18.20 ([PR #33631](https://github.com/microsoft/fluentui/pull/33631) by beachball)
30
+
7
31
  ## [9.13.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-aria_v9.13.13)
8
32
 
9
- Wed, 08 Jan 2025 18:29:15 GMT
33
+ Wed, 08 Jan 2025 18:33:36 GMT
10
34
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-aria_v9.13.12..@fluentui/react-aria_v9.13.13)
11
35
 
12
36
  ### Patches
@@ -1,5 +1,6 @@
1
1
  import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
2
2
  import { createPriorityQueue, useTimeout } from '@fluentui/react-utilities';
3
+ import { useDangerousNeverHidden_unstable as useDangerousNeverHidden } from '@fluentui/react-tabster';
3
4
  import * as React from 'react';
4
5
  /** The duration the message needs to be in present in DOM for screen readers to register a change and announce */ const MESSAGE_DURATION = 500;
5
6
  const VISUALLY_HIDDEN_STYLES = {
@@ -15,6 +16,7 @@ const VISUALLY_HIDDEN_STYLES = {
15
16
  const { targetDocument } = useFluent();
16
17
  const timeoutRef = React.useRef(undefined);
17
18
  const [setAnnounceTimeout, clearAnnounceTimeout] = useTimeout();
19
+ const tabsterNeverHiddenAttributes = useDangerousNeverHidden();
18
20
  const elementRef = React.useRef(null);
19
21
  const order = React.useRef(0);
20
22
  // investigate alert implementation later
@@ -107,6 +109,9 @@ const VISUALLY_HIDDEN_STYLES = {
107
109
  }
108
110
  const element = targetDocument.createElement('div');
109
111
  element.setAttribute('aria-live', 'assertive');
112
+ Object.entries(tabsterNeverHiddenAttributes).forEach(([key, value])=>{
113
+ element.setAttribute(key, value);
114
+ });
110
115
  Object.assign(element.style, VISUALLY_HIDDEN_STYLES);
111
116
  targetDocument.body.append(element);
112
117
  elementRef.current = element;
@@ -118,6 +123,7 @@ const VISUALLY_HIDDEN_STYLES = {
118
123
  };
119
124
  }, [
120
125
  clearAnnounceTimeout,
126
+ tabsterNeverHiddenAttributes,
121
127
  targetDocument
122
128
  ]);
123
129
  return announce;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/AriaLiveAnnouncer/useDomAnnounce.ts"],"sourcesContent":["import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type { AnnounceOptions } from '@fluentui/react-shared-contexts';\nimport { createPriorityQueue, useTimeout } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport type { AriaLiveAnnounceFn, AriaLiveMessage } from './AriaLiveAnnouncer.types';\n\n/** The duration the message needs to be in present in DOM for screen readers to register a change and announce */\nconst MESSAGE_DURATION = 500;\n\nconst VISUALLY_HIDDEN_STYLES = {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n width: '1px',\n position: 'absolute',\n overflow: 'hidden',\n textWrap: 'nowrap',\n};\n\n/* INTERNAL: implementation of the announcer using a live region element */\nexport const useDomAnnounce_unstable = (): AriaLiveAnnounceFn => {\n const { targetDocument } = useFluent();\n\n const timeoutRef = React.useRef<number | undefined>(undefined);\n const [setAnnounceTimeout, clearAnnounceTimeout] = useTimeout();\n\n const elementRef = React.useRef<HTMLDivElement | null>(null);\n\n const order = React.useRef(0);\n\n // investigate alert implementation later\n // const [alertList, setAlertList] = React.useState<string[]>([]);\n\n const batchMessages = React.useRef<{ batchId: string; message: AriaLiveMessage }[]>([]);\n\n const [messageQueue] = React.useState(() =>\n createPriorityQueue<AriaLiveMessage>((a, b) => {\n if (a.priority !== b.priority) {\n return b.priority - a.priority;\n }\n\n return a.createdAt - b.createdAt;\n }),\n );\n\n const queueMessage = React.useCallback(() => {\n if (timeoutRef.current || !elementRef.current) {\n return;\n }\n\n const runCycle = () => {\n if (!elementRef.current) {\n return;\n }\n\n if (targetDocument && messageQueue.peek()) {\n // need a wrapping element for Narrator/Edge, which currently does not pick up text-only live region changes\n // consistently\n // if this is fixed, we can set textContent to the string directly\n\n const wrappingEl = targetDocument.createElement('span');\n\n wrappingEl.innerText = messageQueue\n .all()\n .filter(msg => msg.message.trim().length > 0)\n .reduce((prevText, currMsg) => prevText + currMsg.message + '. ', '');\n\n elementRef.current.innerText = '';\n elementRef.current.appendChild(wrappingEl);\n\n messageQueue.clear();\n batchMessages.current = [];\n\n // begin new cycle to clear (or update) messages\n timeoutRef.current = setAnnounceTimeout(() => {\n runCycle();\n }, MESSAGE_DURATION);\n } else {\n elementRef.current.textContent = '';\n clearAnnounceTimeout();\n\n timeoutRef.current = undefined;\n }\n };\n\n runCycle();\n }, [clearAnnounceTimeout, messageQueue, setAnnounceTimeout, targetDocument]);\n\n const announce: AriaLiveAnnounceFn = React.useCallback(\n (message: string, options: AnnounceOptions = {}) => {\n const { alert = false, priority = 0, batchId } = options;\n\n // check if message is an alert\n if (alert) {\n // TODO: alert implementation\n // setAlertList([...alertList, message]);\n }\n\n const liveMessage: AriaLiveMessage = {\n message,\n createdAt: order.current++,\n priority,\n batchId,\n };\n\n // check if batchId exists\n if (batchId) {\n // update associated msg if it does\n const batchMessage = batchMessages.current.find(msg => msg.batchId === batchId);\n\n if (batchMessage) {\n // replace existing message in queue\n messageQueue.remove(batchMessage.message);\n\n // update list of existing batchIds w/ most recent message\n batchMessage.message = liveMessage;\n } else {\n // update list of existing batchIds, add new if doesn't already exist\n batchMessages.current = [...batchMessages.current, { batchId, message: liveMessage }];\n }\n }\n\n // add new message\n messageQueue.enqueue(liveMessage);\n queueMessage();\n },\n [messageQueue, queueMessage],\n );\n\n React.useEffect(() => {\n if (!targetDocument) {\n return;\n }\n\n const element = targetDocument.createElement('div');\n element.setAttribute('aria-live', 'assertive');\n\n Object.assign(element.style, VISUALLY_HIDDEN_STYLES);\n targetDocument.body.append(element);\n\n elementRef.current = element;\n\n return () => {\n element.remove();\n elementRef.current = null;\n clearAnnounceTimeout();\n timeoutRef.current = undefined;\n };\n }, [clearAnnounceTimeout, targetDocument]);\n\n return announce;\n};\n"],"names":["useFluent_unstable","useFluent","createPriorityQueue","useTimeout","React","MESSAGE_DURATION","VISUALLY_HIDDEN_STYLES","clip","height","margin","width","position","overflow","textWrap","useDomAnnounce_unstable","targetDocument","timeoutRef","useRef","undefined","setAnnounceTimeout","clearAnnounceTimeout","elementRef","order","batchMessages","messageQueue","useState","a","b","priority","createdAt","queueMessage","useCallback","current","runCycle","peek","wrappingEl","createElement","innerText","all","filter","msg","message","trim","length","reduce","prevText","currMsg","appendChild","clear","textContent","announce","options","alert","batchId","liveMessage","batchMessage","find","remove","enqueue","useEffect","element","setAttribute","Object","assign","style","body","append"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,sBAAsBC,SAAS,QAAQ,kCAAkC;AAElF,SAASC,mBAAmB,EAAEC,UAAU,QAAQ,4BAA4B;AAC5E,YAAYC,WAAW,QAAQ;AAI/B,gHAAgH,GAChH,MAAMC,mBAAmB;AAEzB,MAAMC,yBAAyB;IAC7BC,MAAM;IACNC,QAAQ;IACRC,QAAQ;IACRC,OAAO;IACPC,UAAU;IACVC,UAAU;IACVC,UAAU;AACZ;AAEA,yEAAyE,GACzE,OAAO,MAAMC,0BAA0B;IACrC,MAAM,EAAEC,cAAc,EAAE,GAAGd;IAE3B,MAAMe,aAAaZ,MAAMa,MAAM,CAAqBC;IACpD,MAAM,CAACC,oBAAoBC,qBAAqB,GAAGjB;IAEnD,MAAMkB,aAAajB,MAAMa,MAAM,CAAwB;IAEvD,MAAMK,QAAQlB,MAAMa,MAAM,CAAC;IAE3B,yCAAyC;IACzC,kEAAkE;IAElE,MAAMM,gBAAgBnB,MAAMa,MAAM,CAAkD,EAAE;IAEtF,MAAM,CAACO,aAAa,GAAGpB,MAAMqB,QAAQ,CAAC,IACpCvB,oBAAqC,CAACwB,GAAGC;YACvC,IAAID,EAAEE,QAAQ,KAAKD,EAAEC,QAAQ,EAAE;gBAC7B,OAAOD,EAAEC,QAAQ,GAAGF,EAAEE,QAAQ;YAChC;YAEA,OAAOF,EAAEG,SAAS,GAAGF,EAAEE,SAAS;QAClC;IAGF,MAAMC,eAAe1B,MAAM2B,WAAW,CAAC;QACrC,IA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AAI,CAAChB,CAAAA,MAAOA,IAAIa,OAAO,KAAKA;YAEvE,IAAIE,cAAc;gBAChB,oCAAoC;gBACpC/B,aAAaiC,MAAM,CAACF,aAAad,OAAO;gBAExC,0DAA0D;gBAC1Dc,aAAad,OAAO,GAAGa;YACzB,OAAO;gBACL,qEAAqE;gBACrE/B,cAAcS,OAAO,GAAG;uBAAIT,cAAcS,OAAO;oBAAE;wBAAEqB;wBAASZ,SAASa;oBAAY;iBAAE;YACvF;QACF;QAEA,kBAAkB;QAClB9B,aAAakC,OAAO,CAACJ;QACrBxB;IACF,GACA;QAACN;QAAcM;KAAa;IAG9B1B,MAAMuD,SAAS,CAAC;QACd,IAAI,CAAC5C,gBAAgB;YACnB;QACF;QAEA,MAAM6C,UAAU7C,eAAeqB,aAAa,CAAC;QAC7CwB,QAAQC,YAAY,CAAC,aAAa;QAElCC,OAAOC,MAAM,CAACH,QAAQI,KAAK,EAAE1D;QAC7BS,eAAekD,IAAI,CAACC,MAAM,CAACN;QAE3BvC,WAAWW,OAAO,GAAG4B;QAErB,OAAO;YACLA,QAAQH,MAAM;YACdpC,WAAWW,OAAO,GAAG;YACrBZ;YACAJ,WAAWgB,OAAO,GAAGd;QACvB;IACF,GAAG;QAACE;QAAsBL;KAAe;IAEzC,OAAOmC;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/AriaLiveAnnouncer/useDomAnnounce.ts"],"sourcesContent":["import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type { AnnounceOptions } from '@fluentui/react-shared-contexts';\nimport { createPriorityQueue, useTimeout } from '@fluentui/react-utilities';\nimport { useDangerousNeverHidden_unstable as useDangerousNeverHidden } from '@fluentui/react-tabster';\nimport * as React from 'react';\n\nimport type { AriaLiveAnnounceFn, AriaLiveMessage } from './AriaLiveAnnouncer.types';\n\n/** The duration the message needs to be in present in DOM for screen readers to register a change and announce */\nconst MESSAGE_DURATION = 500;\n\nconst VISUALLY_HIDDEN_STYLES = {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n width: '1px',\n position: 'absolute',\n overflow: 'hidden',\n textWrap: 'nowrap',\n};\n\n/* INTERNAL: implementation of the announcer using a live region element */\nexport const useDomAnnounce_unstable = (): AriaLiveAnnounceFn => {\n const { targetDocument } = useFluent();\n\n const timeoutRef = React.useRef<number | undefined>(undefined);\n const [setAnnounceTimeout, clearAnnounceTimeout] = useTimeout();\n const tabsterNeverHiddenAttributes = useDangerousNeverHidden();\n\n const elementRef = React.useRef<HTMLDivElement | null>(null);\n\n const order = React.useRef(0);\n\n // investigate alert implementation later\n // const [alertList, setAlertList] = React.useState<string[]>([]);\n\n const batchMessages = React.useRef<{ batchId: string; message: AriaLiveMessage }[]>([]);\n\n const [messageQueue] = React.useState(() =>\n createPriorityQueue<AriaLiveMessage>((a, b) => {\n if (a.priority !== b.priority) {\n return b.priority - a.priority;\n }\n\n return a.createdAt - b.createdAt;\n }),\n );\n\n const queueMessage = React.useCallback(() => {\n if (timeoutRef.current || !elementRef.current) {\n return;\n }\n\n const runCycle = () => {\n if (!elementRef.current) {\n return;\n }\n\n if (targetDocument && messageQueue.peek()) {\n // need a wrapping element for Narrator/Edge, which currently does not pick up text-only live region changes\n // consistently\n // if this is fixed, we can set textContent to the string directly\n\n const wrappingEl = targetDocument.createElement('span');\n\n wrappingEl.innerText = messageQueue\n .all()\n .filter(msg => msg.message.trim().length > 0)\n .reduce((prevText, currMsg) => prevText + currMsg.message + '. ', '');\n\n elementRef.current.innerText = '';\n elementRef.current.appendChild(wrappingEl);\n\n messageQueue.clear();\n batchMessages.current = [];\n\n // begin new cycle to clear (or update) messages\n timeoutRef.current = setAnnounceTimeout(() => {\n runCycle();\n }, MESSAGE_DURATION);\n } else {\n elementRef.current.textContent = '';\n clearAnnounceTimeout();\n\n timeoutRef.current = undefined;\n }\n };\n\n runCycle();\n }, [clearAnnounceTimeout, messageQueue, setAnnounceTimeout, targetDocument]);\n\n const announce: AriaLiveAnnounceFn = React.useCallback(\n (message: string, options: AnnounceOptions = {}) => {\n const { alert = false, priority = 0, batchId } = options;\n\n // check if message is an alert\n if (alert) {\n // TODO: alert implementation\n // setAlertList([...alertList, message]);\n }\n\n const liveMessage: AriaLiveMessage = {\n message,\n createdAt: order.current++,\n priority,\n batchId,\n };\n\n // check if batchId exists\n if (batchId) {\n // update associated msg if it does\n const batchMessage = batchMessages.current.find(msg => msg.batchId === batchId);\n\n if (batchMessage) {\n // replace existing message in queue\n messageQueue.remove(batchMessage.message);\n\n // update list of existing batchIds w/ most recent message\n batchMessage.message = liveMessage;\n } else {\n // update list of existing batchIds, add new if doesn't already exist\n batchMessages.current = [...batchMessages.current, { batchId, message: liveMessage }];\n }\n }\n\n // add new message\n messageQueue.enqueue(liveMessage);\n queueMessage();\n },\n [messageQueue, queueMessage],\n );\n\n React.useEffect(() => {\n if (!targetDocument) {\n return;\n }\n\n const element = targetDocument.createElement('div');\n element.setAttribute('aria-live', 'assertive');\n\n Object.entries(tabsterNeverHiddenAttributes).forEach(([key, value]) => {\n element.setAttribute(key, value);\n });\n\n Object.assign(element.style, VISUALLY_HIDDEN_STYLES);\n targetDocument.body.append(element);\n\n elementRef.current = element;\n\n return () => {\n element.remove();\n elementRef.current = null;\n clearAnnounceTimeout();\n timeoutRef.current = undefined;\n };\n }, [clearAnnounceTimeout, tabsterNeverHiddenAttributes, targetDocument]);\n\n return announce;\n};\n"],"names":["useFluent_unstable","useFluent","createPriorityQueue","useTimeout","useDangerousNeverHidden_unstable","useDangerousNeverHidden","React","MESSAGE_DURATION","VISUALLY_HIDDEN_STYLES","clip","height","margin","width","position","overflow","textWrap","useDomAnnounce_unstable","targetDocument","timeoutRef","useRef","undefined","setAnnounceTimeout","clearAnnounceTimeout","tabsterNeverHiddenAttributes","elementRef","order","batchMessages","messageQueue","useState","a","b","priority","createdAt","queueMessage","useCallback","current","runCycle","peek","wrappingEl","createElement","innerText","all","filter","msg","message","trim","length","reduce","prevText","currMsg","appendChild","clear","textContent","announce","options","alert","batchId","liveMessage","batchMessage","find","remove","enqueue","useEffect","element","setAttribute","Object","entries","forEach","key","value","assign","style","body","append"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,sBAAsBC,SAAS,QAAQ,kCAAkC;AAElF,SAASC,mBAAmB,EAAEC,UAAU,QAAQ,4BAA4B;AAC5E,SAASC,oCAAoCC,uBAAuB,QAAQ,0BAA0B;AACtG,YAAYC,WAAW,QAAQ;AAI/B,gHAAgH,GAChH,MAAMC,mBAAmB;AAEzB,MAAMC,yBAAyB;IAC7BC,MAAM;IACNC,QAAQ;IACRC,QAAQ;IACRC,OAAO;IACPC,UAAU;IACVC,UAAU;IACVC,UAAU;AACZ;AAEA,yEAAyE,GACzE,OAAO,MAAMC,0BAA0B;IACrC,MAAM,EAAEC,cAAc,EAAE,GAAGhB;IAE3B,MAAMiB,aAAaZ,MAAMa,MAAM,CAAqBC;IACpD,MAAM,CAACC,oBAAoBC,qBAAqB,GAAGnB;IACnD,MAAMoB,+BAA+BlB;IAErC,MAAMmB,aAAalB,MAAMa,MAAM,CAAwB;IAEvD,MAAMM,QAAQnB,MAAMa,MAAM,CAAC;IAE3B,yCAAyC;IACzC,kEAAkE;IAElE,MAAMO,gBAAgBpB,MAAMa,MAAM,CAAkD,EAAE;IAEtF,MAAM,CAACQ,aAAa,GAAGrB,MAAMsB,QAAQ,CAAC,IACpC1B,oBAAqC,CAAC2B,GAAGC;YACvC,IAAID,EAAEE,QAAQ,KAAKD,EAAEC,QAAQ,EAAE;gBAC7B,OAAOD,EAAEC,QAAQ,GAAGF,EAAEE,QAAQ;YAChC;YAEA,OAAOF,EAAEG,SAAS,GAAGF,EAAEE,SAAS;QAClC;IAGF,MAAMC,eAAe3B,MAAM4B,WAAW,CA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AAO,CAACwB,IAAI,CAAChB,CAAAA,MAAOA,IAAIa,OAAO,KAAKA;YAEvE,IAAIE,cAAc;gBAChB,oCAAoC;gBACpC/B,aAAaiC,MAAM,CAACF,aAAad,OAAO;gBAExC,0DAA0D;gBAC1Dc,aAAad,OAAO,GAAGa;YACzB,OAAO;gBACL,qEAAqE;gBACrE/B,cAAcS,OAAO,GAAG;uBAAIT,cAAcS,OAAO;oBAAE;wBAAEqB;wBAASZ,SAASa;oBAAY;iBAAE;YACvF;QACF;QAEA,kBAAkB;QAClB9B,aAAakC,OAAO,CAACJ;QACrBxB;IACF,GACA;QAACN;QAAcM;KAAa;IAG9B3B,MAAMwD,SAAS,CAAC;QACd,IAAI,CAAC7C,gBAAgB;YACnB;QACF;QAEA,MAAM8C,UAAU9C,eAAesB,aAAa,CAAC;QAC7CwB,QAAQC,YAAY,CAAC,aAAa;QAElCC,OAAOC,OAAO,CAAC3C,8BAA8B4C,OAAO,CAAC,CAAC,CAACC,KAAKC,MAAM;YAChEN,QAAQC,YAAY,CAACI,KAAKC;QAC5B;QAEAJ,OAAOK,MAAM,CAACP,QAAQQ,KAAK,EAAE/D;QAC7BS,eAAeuD,IAAI,CAACC,MAAM,CAACV;QAE3BvC,WAAWW,OAAO,GAAG4B;QAErB,OAAO;YACLA,QAAQH,MAAM;YACdpC,WAAWW,OAAO,GAAG;YACrBb;YACAJ,WAAWiB,OAAO,GAAGf;QACvB;IACF,GAAG;QAACE;QAAsBC;QAA8BN;KAAe;IAEvE,OAAOoC;AACT,EAAE"}
@@ -1,3 +1,3 @@
1
1
  export { useARIAButtonProps } from './useARIAButtonProps';
2
- // eslint-disable-next-line deprecation/deprecation
2
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3
3
  export { useARIAButtonShorthand } from './useARIAButtonShorthand';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/button/index.ts"],"sourcesContent":["export { useARIAButtonProps } from './useARIAButtonProps';\n// eslint-disable-next-line deprecation/deprecation\nexport { useARIAButtonShorthand } from './useARIAButtonShorthand';\nexport type {\n ARIAButtonAlteredProps,\n ARIAButtonElement,\n ARIAButtonElementIntersection,\n ARIAButtonProps,\n ARIAButtonResultProps,\n ARIAButtonSlotProps,\n ARIAButtonType,\n} from './types';\n"],"names":["useARIAButtonProps","useARIAButtonShorthand"],"rangeMappings":";;","mappings":"AAAA,SAASA,kBAAkB,QAAQ,uBAAuB;AAC1D,mDAAmD;AACnD,SAASC,sBAAsB,QAAQ,2BAA2B"}
1
+ {"version":3,"sources":["../src/button/index.ts"],"sourcesContent":["export { useARIAButtonProps } from './useARIAButtonProps';\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport { useARIAButtonShorthand } from './useARIAButtonShorthand';\nexport type {\n ARIAButtonAlteredProps,\n ARIAButtonElement,\n ARIAButtonElementIntersection,\n ARIAButtonProps,\n ARIAButtonResultProps,\n ARIAButtonSlotProps,\n ARIAButtonType,\n} from './types';\n"],"names":["useARIAButtonProps","useARIAButtonShorthand"],"rangeMappings":";;","mappings":"AAAA,SAASA,kBAAkB,QAAQ,uBAAuB;AAC1D,4DAA4D;AAC5D,SAASC,sBAAsB,QAAQ,2BAA2B"}
@@ -10,9 +10,9 @@ import { useARIAButtonProps } from './useARIAButtonProps';
10
10
  * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec
11
11
  * for multiple scenarios of shorthand properties. Ensuring 1st rule of ARIA for cases
12
12
  * where no attribute addition is required.
13
- */ // eslint-disable-next-line deprecation/deprecation
13
+ */ // eslint-disable-next-line @typescript-eslint/no-deprecated
14
14
  export const useARIAButtonShorthand = (value, options)=>{
15
- // eslint-disable-next-line deprecation/deprecation
15
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
16
16
  const shorthand = resolveShorthand(value, options);
17
17
  var _shorthand_as;
18
18
  const shorthandARIAButton = useARIAButtonProps((_shorthand_as = shorthand === null || shorthand === void 0 ? void 0 : shorthand.as) !== null && _shorthand_as !== void 0 ? _shorthand_as : 'button', shorthand);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/button/useARIAButtonShorthand.ts"],"sourcesContent":["import { resolveShorthand } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from './useARIAButtonProps';\nimport type { ResolveShorthandFunction } from '@fluentui/react-utilities';\nimport type { ARIAButtonProps, ARIAButtonSlotProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * @deprecated use useARIAButtonProps instead\n *\n * This function expects to receive a slot, if `as` property is not desired use `useARIAButtonProps` instead\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of shorthand properties. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const useARIAButtonShorthand: ResolveShorthandFunction<ARIAButtonSlotProps> = (value, options) => {\n // eslint-disable-next-line deprecation/deprecation\n const shorthand = resolveShorthand(value, options);\n const shorthandARIAButton = useARIAButtonProps<ARIAButtonType, ARIAButtonProps>(shorthand?.as ?? 'button', shorthand);\n return shorthand && shorthandARIAButton;\n};\n"],"names":["resolveShorthand","useARIAButtonProps","useARIAButtonShorthand","value","options","shorthand","shorthandARIAButton","as"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,kBAAkB,QAAQ,uBAAuB;AAI1D;;;;;;;;;;CAUC,GACD,mDAAmD;AACnD,OAAO,MAAMC,yBAAwE,CAACC,OAAOC;IAC3F,mDAAmD;IACnD,MAAMC,YAAYL,iBAAiBG,OAAOC;QACsCC;IAAhF,MAAMC,sBAAsBL,mBAAoDI,CAAAA,gBAAAA,sBAAAA,gCAAAA,UAAWE,EAAE,cAAbF,2BAAAA,gBAAiB,UAAUA;IAC3G,OAAOA,aAAaC;AACtB,EAAE"}
1
+ {"version":3,"sources":["../src/button/useARIAButtonShorthand.ts"],"sourcesContent":["import { resolveShorthand } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from './useARIAButtonProps';\nimport type { ResolveShorthandFunction } from '@fluentui/react-utilities';\nimport type { ARIAButtonProps, ARIAButtonSlotProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * @deprecated use useARIAButtonProps instead\n *\n * This function expects to receive a slot, if `as` property is not desired use `useARIAButtonProps` instead\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of shorthand properties. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport const useARIAButtonShorthand: ResolveShorthandFunction<ARIAButtonSlotProps> = (value, options) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const shorthand = resolveShorthand(value, options);\n const shorthandARIAButton = useARIAButtonProps<ARIAButtonType, ARIAButtonProps>(shorthand?.as ?? 'button', shorthand);\n return shorthand && shorthandARIAButton;\n};\n"],"names":["resolveShorthand","useARIAButtonProps","useARIAButtonShorthand","value","options","shorthand","shorthandARIAButton","as"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,kBAAkB,QAAQ,uBAAuB;AAI1D;;;;;;;;;;CAUC,GACD,4DAA4D;AAC5D,OAAO,MAAMC,yBAAwE,CAACC,OAAOC;IAC3F,4DAA4D;IAC5D,MAAMC,YAAYL,iBAAiBG,OAAOC;QACsCC;IAAhF,MAAMC,sBAAsBL,mBAAoDI,CAAAA,gBAAAA,sBAAAA,gCAAAA,UAAWE,EAAE,cAAbF,2BAAAA,gBAAiB,UAAUA;IAC3G,OAAOA,aAAaC;AACtB,EAAE"}
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { // eslint-disable-next-line deprecation/deprecation
1
+ export { // eslint-disable-next-line @typescript-eslint/no-deprecated
2
2
  useARIAButtonShorthand, useARIAButtonProps } from './button/index';
3
3
  export { useActiveDescendant, ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE, ActiveDescendantContextProvider, useActiveDescendantContext, useHasParentActiveDescendantContext } from './activedescendant';
4
4
  export { AriaLiveAnnouncer, renderAriaLiveAnnouncer_unstable, useAriaLiveAnnouncer_unstable, useAriaLiveAnnouncerContextValues_unstable } from './AriaLiveAnnouncer/index';
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n // eslint-disable-next-line deprecation/deprecation\n useARIAButtonShorthand,\n useARIAButtonProps,\n} from './button/index';\nexport {\n useActiveDescendant,\n ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE,\n ActiveDescendantContextProvider,\n useActiveDescendantContext,\n useHasParentActiveDescendantContext,\n} from './activedescendant';\nexport type {\n ActiveDescendantImperativeRef,\n ActiveDescendantOptions,\n ActiveDescendantContextValue,\n ActiveDescendantChangeEvent,\n} from './activedescendant';\nexport type {\n ARIAButtonSlotProps,\n ARIAButtonProps,\n ARIAButtonResultProps,\n ARIAButtonType,\n ARIAButtonElement,\n ARIAButtonElementIntersection,\n ARIAButtonAlteredProps,\n} from './button/index';\n\nexport {\n AriaLiveAnnouncer,\n renderAriaLiveAnnouncer_unstable,\n useAriaLiveAnnouncer_unstable,\n useAriaLiveAnnouncerContextValues_unstable,\n} from './AriaLiveAnnouncer/index';\nexport type { AriaLiveAnnouncerProps, AriaLiveAnnouncerState } from './AriaLiveAnnouncer/index';\n"],"names":["useARIAButtonShorthand","useARIAButtonProps","useActiveDescendant","ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE","ActiveDescendantContextProvider","useActiveDescendantContext","useHasParentActiveDescendantContext","AriaLiveAnnouncer","renderAriaLiveAnnouncer_unstable","useAriaLiveAnnouncer_unstable","useAriaLiveAnnouncerContextValues_unstable"],"rangeMappings":";;;","mappings":"AAAA,SACE,mDAAmD;AACnDA,sBAAsB,EACtBC,kBAAkB,QACb,iBAAiB;AACxB,SACEC,mBAAmB,EACnBC,uCAAuC,EACvCC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,mCAAmC,QAC9B,qBAAqB;AAiB5B,SACEC,iBAAiB,EACjBC,gCAAgC,EAChCC,6BAA6B,EAC7BC,0CAA0C,QACrC,4BAA4B"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n useARIAButtonShorthand,\n useARIAButtonProps,\n} from './button/index';\nexport {\n useActiveDescendant,\n ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE,\n ActiveDescendantContextProvider,\n useActiveDescendantContext,\n useHasParentActiveDescendantContext,\n} from './activedescendant';\nexport type {\n ActiveDescendantImperativeRef,\n ActiveDescendantOptions,\n ActiveDescendantContextValue,\n ActiveDescendantChangeEvent,\n} from './activedescendant';\nexport type {\n ARIAButtonSlotProps,\n ARIAButtonProps,\n ARIAButtonResultProps,\n ARIAButtonType,\n ARIAButtonElement,\n ARIAButtonElementIntersection,\n ARIAButtonAlteredProps,\n} from './button/index';\n\nexport {\n AriaLiveAnnouncer,\n renderAriaLiveAnnouncer_unstable,\n useAriaLiveAnnouncer_unstable,\n useAriaLiveAnnouncerContextValues_unstable,\n} from './AriaLiveAnnouncer/index';\nexport type { AriaLiveAnnouncerProps, AriaLiveAnnouncerState } from './AriaLiveAnnouncer/index';\n"],"names":["useARIAButtonShorthand","useARIAButtonProps","useActiveDescendant","ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE","ActiveDescendantContextProvider","useActiveDescendantContext","useHasParentActiveDescendantContext","AriaLiveAnnouncer","renderAriaLiveAnnouncer_unstable","useAriaLiveAnnouncer_unstable","useAriaLiveAnnouncerContextValues_unstable"],"rangeMappings":";;;","mappings":"AAAA,SACE,4DAA4D;AAC5DA,sBAAsB,EACtBC,kBAAkB,QACb,iBAAiB;AACxB,SACEC,mBAAmB,EACnBC,uCAAuC,EACvCC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,mCAAmC,QAC9B,qBAAqB;AAiB5B,SACEC,iBAAiB,EACjBC,gCAAgC,EAChCC,6BAA6B,EAC7BC,0CAA0C,QACrC,4BAA4B"}
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "useDomAnnounce_unstable", {
11
11
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
12
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
13
13
  const _reactutilities = require("@fluentui/react-utilities");
14
+ const _reacttabster = require("@fluentui/react-tabster");
14
15
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
15
16
  /** The duration the message needs to be in present in DOM for screen readers to register a change and announce */ const MESSAGE_DURATION = 500;
16
17
  const VISUALLY_HIDDEN_STYLES = {
@@ -26,6 +27,7 @@ const useDomAnnounce_unstable = ()=>{
26
27
  const { targetDocument } = (0, _reactsharedcontexts.useFluent_unstable)();
27
28
  const timeoutRef = _react.useRef(undefined);
28
29
  const [setAnnounceTimeout, clearAnnounceTimeout] = (0, _reactutilities.useTimeout)();
30
+ const tabsterNeverHiddenAttributes = (0, _reacttabster.useDangerousNeverHidden_unstable)();
29
31
  const elementRef = _react.useRef(null);
30
32
  const order = _react.useRef(0);
31
33
  // investigate alert implementation later
@@ -118,6 +120,9 @@ const useDomAnnounce_unstable = ()=>{
118
120
  }
119
121
  const element = targetDocument.createElement('div');
120
122
  element.setAttribute('aria-live', 'assertive');
123
+ Object.entries(tabsterNeverHiddenAttributes).forEach(([key, value])=>{
124
+ element.setAttribute(key, value);
125
+ });
121
126
  Object.assign(element.style, VISUALLY_HIDDEN_STYLES);
122
127
  targetDocument.body.append(element);
123
128
  elementRef.current = element;
@@ -129,6 +134,7 @@ const useDomAnnounce_unstable = ()=>{
129
134
  };
130
135
  }, [
131
136
  clearAnnounceTimeout,
137
+ tabsterNeverHiddenAttributes,
132
138
  targetDocument
133
139
  ]);
134
140
  return announce;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/AriaLiveAnnouncer/useDomAnnounce.ts"],"sourcesContent":["import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type { AnnounceOptions } from '@fluentui/react-shared-contexts';\nimport { createPriorityQueue, useTimeout } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport type { AriaLiveAnnounceFn, AriaLiveMessage } from './AriaLiveAnnouncer.types';\n\n/** The duration the message needs to be in present in DOM for screen readers to register a change and announce */\nconst MESSAGE_DURATION = 500;\n\nconst VISUALLY_HIDDEN_STYLES = {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n width: '1px',\n position: 'absolute',\n overflow: 'hidden',\n textWrap: 'nowrap',\n};\n\n/* INTERNAL: implementation of the announcer using a live region element */\nexport const useDomAnnounce_unstable = (): AriaLiveAnnounceFn => {\n const { targetDocument } = useFluent();\n\n const timeoutRef = React.useRef<number | undefined>(undefined);\n const [setAnnounceTimeout, clearAnnounceTimeout] = useTimeout();\n\n const elementRef = React.useRef<HTMLDivElement | null>(null);\n\n const order = React.useRef(0);\n\n // investigate alert implementation later\n // const [alertList, setAlertList] = React.useState<string[]>([]);\n\n const batchMessages = React.useRef<{ batchId: string; message: AriaLiveMessage }[]>([]);\n\n const [messageQueue] = React.useState(() =>\n createPriorityQueue<AriaLiveMessage>((a, b) => {\n if (a.priority !== b.priority) {\n return b.priority - a.priority;\n }\n\n return a.createdAt - b.createdAt;\n }),\n );\n\n const queueMessage = React.useCallback(() => {\n if (timeoutRef.current || !elementRef.current) {\n return;\n }\n\n const runCycle = () => {\n if (!elementRef.current) {\n return;\n }\n\n if (targetDocument && messageQueue.peek()) {\n // need a wrapping element for Narrator/Edge, which currently does not pick up text-only live region changes\n // consistently\n // if this is fixed, we can set textContent to the string directly\n\n const wrappingEl = targetDocument.createElement('span');\n\n wrappingEl.innerText = messageQueue\n .all()\n .filter(msg => msg.message.trim().length > 0)\n .reduce((prevText, currMsg) => prevText + currMsg.message + '. ', '');\n\n elementRef.current.innerText = '';\n elementRef.current.appendChild(wrappingEl);\n\n messageQueue.clear();\n batchMessages.current = [];\n\n // begin new cycle to clear (or update) messages\n timeoutRef.current = setAnnounceTimeout(() => {\n runCycle();\n }, MESSAGE_DURATION);\n } else {\n elementRef.current.textContent = '';\n clearAnnounceTimeout();\n\n timeoutRef.current = undefined;\n }\n };\n\n runCycle();\n }, [clearAnnounceTimeout, messageQueue, setAnnounceTimeout, targetDocument]);\n\n const announce: AriaLiveAnnounceFn = React.useCallback(\n (message: string, options: AnnounceOptions = {}) => {\n const { alert = false, priority = 0, batchId } = options;\n\n // check if message is an alert\n if (alert) {\n // TODO: alert implementation\n // setAlertList([...alertList, message]);\n }\n\n const liveMessage: AriaLiveMessage = {\n message,\n createdAt: order.current++,\n priority,\n batchId,\n };\n\n // check if batchId exists\n if (batchId) {\n // update associated msg if it does\n const batchMessage = batchMessages.current.find(msg => msg.batchId === batchId);\n\n if (batchMessage) {\n // replace existing message in queue\n messageQueue.remove(batchMessage.message);\n\n // update list of existing batchIds w/ most recent message\n batchMessage.message = liveMessage;\n } else {\n // update list of existing batchIds, add new if doesn't already exist\n batchMessages.current = [...batchMessages.current, { batchId, message: liveMessage }];\n }\n }\n\n // add new message\n messageQueue.enqueue(liveMessage);\n queueMessage();\n },\n [messageQueue, queueMessage],\n );\n\n React.useEffect(() => {\n if (!targetDocument) {\n return;\n }\n\n const element = targetDocument.createElement('div');\n element.setAttribute('aria-live', 'assertive');\n\n Object.assign(element.style, VISUALLY_HIDDEN_STYLES);\n targetDocument.body.append(element);\n\n elementRef.current = element;\n\n return () => {\n element.remove();\n elementRef.current = null;\n clearAnnounceTimeout();\n timeoutRef.current = undefined;\n };\n }, [clearAnnounceTimeout, targetDocument]);\n\n return announce;\n};\n"],"names":["useDomAnnounce_unstable","MESSAGE_DURATION","VISUALLY_HIDDEN_STYLES","clip","height","margin","width","position","overflow","textWrap","targetDocument","useFluent","timeoutRef","React","useRef","undefined","setAnnounceTimeout","clearAnnounceTimeout","useTimeout","elementRef","order","batchMessages","messageQueue","useState","createPriorityQueue","a","b","priority","createdAt","queueMessage","useCallback","current","runCycle","peek","wrappingEl","createElement","innerText","all","filter","msg","message","trim","length","reduce","prevText","currMsg","appendChild","clear","textContent","announce","options","alert","batchId","liveMessage","batchMessage","find","remove","enqueue","useEffect","element","setAttribute","Object","assign","style","body","append"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAqBaA;;;eAAAA;;;;qCArBmC;gCAEA;iEACzB;AAIvB,gHAAgH,GAChH,MAAMC,mBAAmB;AAEzB,MAAMC,yBAAyB;IAC7BC,MAAM;IACNC,QAAQ;IACRC,QAAQ;IACRC,OAAO;IACPC,UAAU;IACVC,UAAU;IACVC,UAAU;AACZ;AAGO,MAAMT,0BAA0B;IACrC,MAAM,EAAEU,cAAc,EAAE,GAAGC,IAAAA,uCAAS;IAEpC,MAAMC,aAAaC,OAAMC,MAAM,CAAqBC;IACpD,MAAM,CAACC,oBAAoBC,qBAAqB,GAAGC,IAAAA,0BAAU;IAE7D,MAAMC,aAAaN,OAAMC,MAAM,CAAwB;IAEvD,MAAMM,QAAQP,OAAMC,MAAM,CAAC;IAE3B,yCAAyC;IACzC,kEAAkE;IAElE,MAAMO,gBAAgBR,OAAMC,MAAM,CAAkD,EAAE;IAEtF,MAAM,CAACQ,aAAa,GAAGT,OAAMU,QAAQ,CAAC,IACpCC,IAAAA,mCAAmB,EAAkB,CAACC,GAAGC;YACvC,IAAID,EAAEE,QAAQ,KAAKD,EAAEC,QAAQ,EAAE;gBAC7B,OAAOD,EAAEC,QAAQ,GAAGF,EAAEE,QAAQ;YAChC;YAEA,OAAOF,EAAEG,SAAS,GAAGF,EAAEE,SAAS;QAClC;IAGF,MAAMC,eAAehB,OAAMiB,WAAW,CAAC;QACrC,IAAIlB,WAAWmB,O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CAAAA,MAAOA,IAAIa,OAAO,KAAKA;YAEvE,IAAIE,cAAc;gBAChB,oCAAoC;gBACpChC,aAAakC,MAAM,CAACF,aAAad,OAAO;gBAExC,0DAA0D;gBAC1Dc,aAAad,OAAO,GAAGa;YACzB,OAAO;gBACL,qEAAqE;gBACrEhC,cAAcU,OAAO,GAAG;uBAAIV,cAAcU,OAAO;oBAAE;wBAAEqB;wBAASZ,SAASa;oBAAY;iBAAE;YACvF;QACF;QAEA,kBAAkB;QAClB/B,aAAamC,OAAO,CAACJ;QACrBxB;IACF,GACA;QAACP;QAAcO;KAAa;IAG9BhB,OAAM6C,SAAS,CAAC;QACd,IAAI,CAAChD,gBAAgB;YACnB;QACF;QAEA,MAAMiD,UAAUjD,eAAeyB,aAAa,CAAC;QAC7CwB,QAAQC,YAAY,CAAC,aAAa;QAElCC,OAAOC,MAAM,CAACH,QAAQI,KAAK,EAAE7D;QAC7BQ,eAAesD,IAAI,CAACC,MAAM,CAACN;QAE3BxC,WAAWY,OAAO,GAAG4B;QAErB,OAAO;YACLA,QAAQH,MAAM;YACdrC,WAAWY,OAAO,GAAG;YACrBd;YACAL,WAAWmB,OAAO,GAAGhB;QACvB;IACF,GAAG;QAACE;QAAsBP;KAAe;IAEzC,OAAOuC;AACT"}
1
+ {"version":3,"sources":["../src/AriaLiveAnnouncer/useDomAnnounce.ts"],"sourcesContent":["import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type { AnnounceOptions } from '@fluentui/react-shared-contexts';\nimport { createPriorityQueue, useTimeout } from '@fluentui/react-utilities';\nimport { useDangerousNeverHidden_unstable as useDangerousNeverHidden } from '@fluentui/react-tabster';\nimport * as React from 'react';\n\nimport type { AriaLiveAnnounceFn, AriaLiveMessage } from './AriaLiveAnnouncer.types';\n\n/** The duration the message needs to be in present in DOM for screen readers to register a change and announce */\nconst MESSAGE_DURATION = 500;\n\nconst VISUALLY_HIDDEN_STYLES = {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n width: '1px',\n position: 'absolute',\n overflow: 'hidden',\n textWrap: 'nowrap',\n};\n\n/* INTERNAL: implementation of the announcer using a live region element */\nexport const useDomAnnounce_unstable = (): AriaLiveAnnounceFn => {\n const { targetDocument } = useFluent();\n\n const timeoutRef = React.useRef<number | undefined>(undefined);\n const [setAnnounceTimeout, clearAnnounceTimeout] = useTimeout();\n const tabsterNeverHiddenAttributes = useDangerousNeverHidden();\n\n const elementRef = React.useRef<HTMLDivElement | null>(null);\n\n const order = React.useRef(0);\n\n // investigate alert implementation later\n // const [alertList, setAlertList] = React.useState<string[]>([]);\n\n const batchMessages = React.useRef<{ batchId: string; message: AriaLiveMessage }[]>([]);\n\n const [messageQueue] = React.useState(() =>\n createPriorityQueue<AriaLiveMessage>((a, b) => {\n if (a.priority !== b.priority) {\n return b.priority - a.priority;\n }\n\n return a.createdAt - b.createdAt;\n }),\n );\n\n const queueMessage = React.useCallback(() => {\n if (timeoutRef.current || !elementRef.current) {\n return;\n }\n\n const runCycle = () => {\n if (!elementRef.current) {\n return;\n }\n\n if (targetDocument && messageQueue.peek()) {\n // need a wrapping element for Narrator/Edge, which currently does not pick up text-only live region changes\n // consistently\n // if this is fixed, we can set textContent to the string directly\n\n const wrappingEl = targetDocument.createElement('span');\n\n wrappingEl.innerText = messageQueue\n .all()\n .filter(msg => msg.message.trim().length > 0)\n .reduce((prevText, currMsg) => prevText + currMsg.message + '. ', '');\n\n elementRef.current.innerText = '';\n elementRef.current.appendChild(wrappingEl);\n\n messageQueue.clear();\n batchMessages.current = [];\n\n // begin new cycle to clear (or update) messages\n timeoutRef.current = setAnnounceTimeout(() => {\n runCycle();\n }, MESSAGE_DURATION);\n } else {\n elementRef.current.textContent = '';\n clearAnnounceTimeout();\n\n timeoutRef.current = undefined;\n }\n };\n\n runCycle();\n }, [clearAnnounceTimeout, messageQueue, setAnnounceTimeout, targetDocument]);\n\n const announce: AriaLiveAnnounceFn = React.useCallback(\n (message: string, options: AnnounceOptions = {}) => {\n const { alert = false, priority = 0, batchId } = options;\n\n // check if message is an alert\n if (alert) {\n // TODO: alert implementation\n // setAlertList([...alertList, message]);\n }\n\n const liveMessage: AriaLiveMessage = {\n message,\n createdAt: order.current++,\n priority,\n batchId,\n };\n\n // check if batchId exists\n if (batchId) {\n // update associated msg if it does\n const batchMessage = batchMessages.current.find(msg => msg.batchId === batchId);\n\n if (batchMessage) {\n // replace existing message in queue\n messageQueue.remove(batchMessage.message);\n\n // update list of existing batchIds w/ most recent message\n batchMessage.message = liveMessage;\n } else {\n // update list of existing batchIds, add new if doesn't already exist\n batchMessages.current = [...batchMessages.current, { batchId, message: liveMessage }];\n }\n }\n\n // add new message\n messageQueue.enqueue(liveMessage);\n queueMessage();\n },\n [messageQueue, queueMessage],\n );\n\n React.useEffect(() => {\n if (!targetDocument) {\n return;\n }\n\n const element = targetDocument.createElement('div');\n element.setAttribute('aria-live', 'assertive');\n\n Object.entries(tabsterNeverHiddenAttributes).forEach(([key, value]) => {\n element.setAttribute(key, value);\n });\n\n Object.assign(element.style, VISUALLY_HIDDEN_STYLES);\n targetDocument.body.append(element);\n\n elementRef.current = element;\n\n return () => {\n element.remove();\n elementRef.current = null;\n clearAnnounceTimeout();\n timeoutRef.current = undefined;\n };\n }, [clearAnnounceTimeout, tabsterNeverHiddenAttributes, targetDocument]);\n\n return announce;\n};\n"],"names":["useDomAnnounce_unstable","MESSAGE_DURATION","VISUALLY_HIDDEN_STYLES","clip","height","margin","width","position","overflow","textWrap","targetDocument","useFluent","timeoutRef","React","useRef","undefined","setAnnounceTimeout","clearAnnounceTimeout","useTimeout","tabsterNeverHiddenAttributes","useDangerousNeverHidden","elementRef","order","batchMessages","messageQueue","useState","createPriorityQueue","a","b","priority","createdAt","queueMessage","useCallback","current","runCycle","peek","wrappingEl","createElement","innerText","all","filter","msg","message","trim","length","reduce","prevText","currMsg","appendChild","clear","textContent","announce","options","alert","batchId","liveMessage","batchMessage","find","remove","enqueue","useEffect","element","setAtt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CAACF,aAAad,OAAO;gBAExC,0DAA0D;gBAC1Dc,aAAad,OAAO,GAAGa;YACzB,OAAO;gBACL,qEAAqE;gBACrEhC,cAAcU,OAAO,GAAG;uBAAIV,cAAcU,OAAO;oBAAE;wBAAEqB;wBAASZ,SAASa;oBAAY;iBAAE;YACvF;QACF;QAEA,kBAAkB;QAClB/B,aAAamC,OAAO,CAACJ;QACrBxB;IACF,GACA;QAACP;QAAcO;KAAa;IAG9BlB,OAAM+C,SAAS,CAAC;QACd,IAAI,CAAClD,gBAAgB;YACnB;QACF;QAEA,MAAMmD,UAAUnD,eAAe2B,aAAa,CAAC;QAC7CwB,QAAQC,YAAY,CAAC,aAAa;QAElCC,OAAOC,OAAO,CAAC7C,8BAA8B8C,OAAO,CAAC,CAAC,CAACC,KAAKC,MAAM;YAChEN,QAAQC,YAAY,CAACI,KAAKC;QAC5B;QAEAJ,OAAOK,MAAM,CAACP,QAAQQ,KAAK,EAAEnE;QAC7BQ,eAAe4D,IAAI,CAACC,MAAM,CAACV;QAE3BxC,WAAWY,OAAO,GAAG4B;QAErB,OAAO;YACLA,QAAQH,MAAM;YACdrC,WAAWY,OAAO,GAAG;YACrBhB;YACAL,WAAWqB,OAAO,GAAGlB;QACvB;IACF,GAAG;QAACE;QAAsBE;QAA8BT;KAAe;IAEvE,OAAOyC;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/button/index.ts"],"sourcesContent":["export { useARIAButtonProps } from './useARIAButtonProps';\n// eslint-disable-next-line deprecation/deprecation\nexport { useARIAButtonShorthand } from './useARIAButtonShorthand';\nexport type {\n ARIAButtonAlteredProps,\n ARIAButtonElement,\n ARIAButtonElementIntersection,\n ARIAButtonProps,\n ARIAButtonResultProps,\n ARIAButtonSlotProps,\n ARIAButtonType,\n} from './types';\n"],"names":["useARIAButtonProps","useARIAButtonShorthand"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,kBAAkB;eAAlBA,sCAAkB;;IAElBC,sBAAsB;eAAtBA,8CAAsB;;;oCAFI;wCAEI"}
1
+ {"version":3,"sources":["../src/button/index.ts"],"sourcesContent":["export { useARIAButtonProps } from './useARIAButtonProps';\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport { useARIAButtonShorthand } from './useARIAButtonShorthand';\nexport type {\n ARIAButtonAlteredProps,\n ARIAButtonElement,\n ARIAButtonElementIntersection,\n ARIAButtonProps,\n ARIAButtonResultProps,\n ARIAButtonSlotProps,\n ARIAButtonType,\n} from './types';\n"],"names":["useARIAButtonProps","useARIAButtonShorthand"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,kBAAkB;eAAlBA,sCAAkB;;IAElBC,sBAAsB;eAAtBA,8CAAsB;;;oCAFI;wCAEI"}
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "useARIAButtonShorthand", {
11
11
  const _reactutilities = require("@fluentui/react-utilities");
12
12
  const _useARIAButtonProps = require("./useARIAButtonProps");
13
13
  const useARIAButtonShorthand = (value, options)=>{
14
- // eslint-disable-next-line deprecation/deprecation
14
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
15
15
  const shorthand = (0, _reactutilities.resolveShorthand)(value, options);
16
16
  var _shorthand_as;
17
17
  const shorthandARIAButton = (0, _useARIAButtonProps.useARIAButtonProps)((_shorthand_as = shorthand === null || shorthand === void 0 ? void 0 : shorthand.as) !== null && _shorthand_as !== void 0 ? _shorthand_as : 'button', shorthand);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/button/useARIAButtonShorthand.ts"],"sourcesContent":["import { resolveShorthand } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from './useARIAButtonProps';\nimport type { ResolveShorthandFunction } from '@fluentui/react-utilities';\nimport type { ARIAButtonProps, ARIAButtonSlotProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * @deprecated use useARIAButtonProps instead\n *\n * This function expects to receive a slot, if `as` property is not desired use `useARIAButtonProps` instead\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of shorthand properties. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const useARIAButtonShorthand: ResolveShorthandFunction<ARIAButtonSlotProps> = (value, options) => {\n // eslint-disable-next-line deprecation/deprecation\n const shorthand = resolveShorthand(value, options);\n const shorthandARIAButton = useARIAButtonProps<ARIAButtonType, ARIAButtonProps>(shorthand?.as ?? 'button', shorthand);\n return shorthand && shorthandARIAButton;\n};\n"],"names":["useARIAButtonShorthand","value","options","shorthand","resolveShorthand","shorthandARIAButton","useARIAButtonProps","as"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBaA;;;eAAAA;;;gCAjBoB;oCACE;AAgB5B,MAAMA,yBAAwE,CAACC,OAAOC;IAC3F,mDAAmD;IACnD,MAAMC,YAAYC,IAAAA,gCAAgB,EAACH,OAAOC;QACsCC;IAAhF,MAAME,sBAAsBC,IAAAA,sCAAkB,EAAkCH,CAAAA,gBAAAA,sBAAAA,gCAAAA,UAAWI,EAAE,cAAbJ,2BAAAA,gBAAiB,UAAUA;IAC3G,OAAOA,aAAaE;AACtB"}
1
+ {"version":3,"sources":["../src/button/useARIAButtonShorthand.ts"],"sourcesContent":["import { resolveShorthand } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from './useARIAButtonProps';\nimport type { ResolveShorthandFunction } from '@fluentui/react-utilities';\nimport type { ARIAButtonProps, ARIAButtonSlotProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * @deprecated use useARIAButtonProps instead\n *\n * This function expects to receive a slot, if `as` property is not desired use `useARIAButtonProps` instead\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of shorthand properties. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport const useARIAButtonShorthand: ResolveShorthandFunction<ARIAButtonSlotProps> = (value, options) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const shorthand = resolveShorthand(value, options);\n const shorthandARIAButton = useARIAButtonProps<ARIAButtonType, ARIAButtonProps>(shorthand?.as ?? 'button', shorthand);\n return shorthand && shorthandARIAButton;\n};\n"],"names":["useARIAButtonShorthand","value","options","shorthand","resolveShorthand","shorthandARIAButton","useARIAButtonProps","as"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBaA;;;eAAAA;;;gCAjBoB;oCACE;AAgB5B,MAAMA,yBAAwE,CAACC,OAAOC;IAC3F,4DAA4D;IAC5D,MAAMC,YAAYC,IAAAA,gCAAgB,EAACH,OAAOC;QACsCC;IAAhF,MAAME,sBAAsBC,IAAAA,sCAAkB,EAAkCH,CAAAA,gBAAAA,sBAAAA,gCAAAA,UAAWI,EAAE,cAAbJ,2BAAAA,gBAAiB,UAAUA;IAC3G,OAAOA,aAAaE;AACtB"}
@@ -24,7 +24,7 @@ _export(exports, {
24
24
  useARIAButtonProps: function() {
25
25
  return _index.useARIAButtonProps;
26
26
  },
27
- // eslint-disable-next-line deprecation/deprecation
27
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
28
28
  useARIAButtonShorthand: function() {
29
29
  return _index.useARIAButtonShorthand;
30
30
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n // eslint-disable-next-line deprecation/deprecation\n useARIAButtonShorthand,\n useARIAButtonProps,\n} from './button/index';\nexport {\n useActiveDescendant,\n ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE,\n ActiveDescendantContextProvider,\n useActiveDescendantContext,\n useHasParentActiveDescendantContext,\n} from './activedescendant';\nexport type {\n ActiveDescendantImperativeRef,\n ActiveDescendantOptions,\n ActiveDescendantContextValue,\n ActiveDescendantChangeEvent,\n} from './activedescendant';\nexport type {\n ARIAButtonSlotProps,\n ARIAButtonProps,\n ARIAButtonResultProps,\n ARIAButtonType,\n ARIAButtonElement,\n ARIAButtonElementIntersection,\n ARIAButtonAlteredProps,\n} from './button/index';\n\nexport {\n AriaLiveAnnouncer,\n renderAriaLiveAnnouncer_unstable,\n useAriaLiveAnnouncer_unstable,\n useAriaLiveAnnouncerContextValues_unstable,\n} from './AriaLiveAnnouncer/index';\nexport type { AriaLiveAnnouncerProps, AriaLiveAnnouncerState } from './AriaLiveAnnouncer/index';\n"],"names":["ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE","ActiveDescendantContextProvider","AriaLiveAnnouncer","renderAriaLiveAnnouncer_unstable","useARIAButtonProps","useARIAButtonShorthand","useActiveDescendant","useActiveDescendantContext","useAriaLiveAnnouncerContextValues_unstable","useAriaLiveAnnouncer_unstable","useHasParentActiveDescendantContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAOEA,uCAAuC;eAAvCA,yDAAuC;;IACvCC,+BAA+B;eAA/BA,iDAA+B;;IAqB/BC,iBAAiB;eAAjBA,yBAAiB;;IACjBC,gCAAgC;eAAhCA,wCAAgC;;IA3BhCC,kBAAkB;eAAlBA,yBAAkB;;IAFlB,mDAAmD;IACnDC,sBAAsB;eAAtBA,6BAAsB;;IAItBC,mBAAmB;eAAnBA,qCAAmB;;IAGnBC,0BAA0B;eAA1BA,4CAA0B;;IAuB1BC,0CAA0C;eAA1CA,kDAA0C;;IAD1CC,6BAA6B;eAA7BA,qCAA6B;;IArB7BC,mCAAmC;eAAnCA,qDAAmC;;;uBAN9B;kCAOA;wBAsBA"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n useARIAButtonShorthand,\n useARIAButtonProps,\n} from './button/index';\nexport {\n useActiveDescendant,\n ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE,\n ActiveDescendantContextProvider,\n useActiveDescendantContext,\n useHasParentActiveDescendantContext,\n} from './activedescendant';\nexport type {\n ActiveDescendantImperativeRef,\n ActiveDescendantOptions,\n ActiveDescendantContextValue,\n ActiveDescendantChangeEvent,\n} from './activedescendant';\nexport type {\n ARIAButtonSlotProps,\n ARIAButtonProps,\n ARIAButtonResultProps,\n ARIAButtonType,\n ARIAButtonElement,\n ARIAButtonElementIntersection,\n ARIAButtonAlteredProps,\n} from './button/index';\n\nexport {\n AriaLiveAnnouncer,\n renderAriaLiveAnnouncer_unstable,\n useAriaLiveAnnouncer_unstable,\n useAriaLiveAnnouncerContextValues_unstable,\n} from './AriaLiveAnnouncer/index';\nexport type { AriaLiveAnnouncerProps, AriaLiveAnnouncerState } from './AriaLiveAnnouncer/index';\n"],"names":["ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE","ActiveDescendantContextProvider","AriaLiveAnnouncer","renderAriaLiveAnnouncer_unstable","useARIAButtonProps","useARIAButtonShorthand","useActiveDescendant","useActiveDescendantContext","useAriaLiveAnnouncerContextValues_unstable","useAriaLiveAnnouncer_unstable","useHasParentActiveDescendantContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAOEA,uCAAuC;eAAvCA,yDAAuC;;IACvCC,+BAA+B;eAA/BA,iDAA+B;;IAqB/BC,iBAAiB;eAAjBA,yBAAiB;;IACjBC,gCAAgC;eAAhCA,wCAAgC;;IA3BhCC,kBAAkB;eAAlBA,yBAAkB;;IAFlB,4DAA4D;IAC5DC,sBAAsB;eAAtBA,6BAAsB;;IAItBC,mBAAmB;eAAnBA,qCAAmB;;IAGnBC,0BAA0B;eAA1BA,4CAA0B;;IAuB1BC,0CAA0C;eAA1CA,kDAA0C;;IAD1CC,6BAA6B;eAA7BA,qCAA6B;;IArB7BC,mCAAmC;eAAnCA,qDAAmC;;;uBAN9B;kCAOA;wBAsBA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-aria",
3
- "version": "9.13.13",
3
+ "version": "9.14.0",
4
4
  "description": "React helper to ensure ARIA",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@fluentui/keyboard-keys": "^9.0.8",
22
22
  "@fluentui/react-shared-contexts": "^9.21.2",
23
- "@fluentui/react-jsx-runtime": "^9.0.49",
24
- "@fluentui/react-tabster": "^9.23.2",
25
- "@fluentui/react-utilities": "^9.18.19",
23
+ "@fluentui/react-jsx-runtime": "^9.0.50",
24
+ "@fluentui/react-tabster": "^9.24.0",
25
+ "@fluentui/react-utilities": "^9.18.20",
26
26
  "@swc/helpers": "^0.5.1"
27
27
  },
28
28
  "peerDependencies": {