communication-react-19
Version:
React library for building modern communication user experiences utilizing Azure Communication Services (React 19 compatible fork)
29 lines • 911 B
JavaScript
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { Stack } from '@fluentui/react';
import React from 'react';
/**
* @internal
* Announcer component to maker aria announcements on actions
*/
export const Announcer = (props) => {
const { announcementString, ariaLive } = props;
return (React.createElement(Stack, { "aria-label": announcementString, "aria-live": ariaLive, role: "status", "aria-atomic": true, styles: announcerStyles }));
};
/**
* Styles to hide the announcer from view but still existing on the DOM tree it so that narration can happen.
*/
const announcerStyles = {
root: {
position: 'absolute',
width: '1px',
height: '1px',
padding: 0,
margin: '-1px',
overflow: 'hidden',
clip: 'rect(0,0,0,0)',
whiteSpace: 'nowrap',
border: 0
}
};
//# sourceMappingURL=Announcer.js.map