Introduce initial screen reader mode handling and flag (#6653)

This commit is contained in:
christine betts
2025-08-21 22:29:15 +00:00
committed by GitHub
parent 679acc45b2
commit 10286934e6
14 changed files with 125 additions and 52 deletions
@@ -7,6 +7,7 @@
import React from 'react';
import { Text, Box } from 'ink';
import { Colors } from '../../colors.js';
import { SCREEN_READER_USER_PREFIX } from '../../constants.js';
interface UserMessageProps {
text: string;
@@ -31,7 +32,9 @@ export const UserMessage: React.FC<UserMessageProps> = ({ text }) => {
alignSelf="flex-start"
>
<Box width={prefixWidth}>
<Text color={textColor}>{prefix}</Text>
<Text color={textColor} aria-label={SCREEN_READER_USER_PREFIX}>
{prefix}
</Text>
</Box>
<Box flexGrow={1}>
<Text wrap="wrap" color={textColor}>