mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 09:50:15 +01:00
🎙️ a11y: Screen Reader Support for Dynamic Content Updates (#3625)
* WIP: first pass, hooks * wip: isStream arg * feat: first pass, dynamic content updates, screen reader announcements * chore: unrelated, styling redundancy
This commit is contained in:
parent
05696233a9
commit
6655304753
14 changed files with 353 additions and 54 deletions
12
client/src/a11y/LiveMessenger.tsx
Normal file
12
client/src/a11y/LiveMessenger.tsx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
import AnnouncerContext from '~/Providers/AnnouncerContext';
|
||||
|
||||
interface LiveMessengerProps {
|
||||
children: (context: React.ContextType<typeof AnnouncerContext>) => React.ReactNode;
|
||||
}
|
||||
|
||||
const LiveMessenger: React.FC<LiveMessengerProps> = ({ children }) => (
|
||||
<AnnouncerContext.Consumer>{(contextProps) => children(contextProps)}</AnnouncerContext.Consumer>
|
||||
);
|
||||
|
||||
export default LiveMessenger;
|
||||
Loading…
Add table
Add a link
Reference in a new issue