Skip to content

Commit dc1a0c6

Browse files
authored
Add aria labels to all logical blocks (#291)
* css changes * more changes
1 parent a3a5873 commit dc1a0c6

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

web/src/components/common/ActionStack.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ const PlanningActionStack: React.FC = () => {
298298
}, []);
299299

300300
return (
301-
<HStack aria-label={"planning"} className={'action-stack'} justifyContent={'start'} width={"100%"}>
301+
<HStack aria-label={"planning"} className={'action-stack'} justifyContent={'start'} width={"100%"}>
302302
<Box
303303
bg={'minusxGreen.800'}
304304
p={2}
@@ -307,12 +307,13 @@ const PlanningActionStack: React.FC = () => {
307307
width={"100%"}
308308
display={"flex"}
309309
justifyContent={"center"}
310+
aria-label={"planning-bubble"}
310311
>
311312
<HStack>
312313
<Box>
313314
<Text key={currentTitleIndex} animation={currentTitleIndex > 0 ? `${scrollUp} 0.5s ease-in-out` : ""} >{planningActions[currentTitleIndex]}</Text>
314315
</Box>
315-
<Spinner size="xs" speed={'0.75s'} color="minusxBW.100" />
316+
<Spinner size="xs" speed={'0.75s'} color="minusxBW.100" aria-label={"planning-spinner"}/>
316317
</HStack>
317318
</Box>
318319
</HStack>

web/src/components/common/Auth.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const FeatureHighlightBubble = ({items}: {items: HighlightItem[]}) => {
5858

5959
return (
6060
isVisibile && <Box position="absolute"
61-
top={items[hintIdx].top}
61+
top={items[hintIdx].top} aria-label='login-highlights'
6262
>
6363
{
6464
items[hintIdx].arrow &&
@@ -335,8 +335,8 @@ const Auth = () => {
335335
<Box p={5} maxW="md" mx="auto" width={`${width}px`} height={"100%"} backgroundColor={"minusxBW.200"}
336336
borderWidth={1.5} borderLeftColor={"minusxBW.500"}>
337337
<Image src={logo} alt="MinusX" maxWidth='150px'/>
338-
<VStack spacing={4} mt={5} position={"relative"}>
339-
{isEmbedded && <Text>Logging you in...</Text>}
338+
{isEmbedded && <Text>Logging you in...</Text>}
339+
<VStack spacing={4} mt={5} position={"relative"} aria-label='login-form'>
340340
<Input
341341
type="email"
342342
placeholder="Enter work email ID"

web/src/components/common/Chat.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ const Chat: React.FC<ReturnType<typeof addToolInfoToActionPlanMessages>[number]>
122122
<ChatContent content={content} messageIndex={index} role={role}/>
123123

124124
<Box
125+
aria-label='message-arrow'
125126
position="absolute"
126127
bottom="-5px"
127128
left={role == 'user' ? 'auto' : '0px'}

web/src/components/common/DemoComponents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const DemoHelperMessage = ({url}: {url: string}) => {
5858
}
5959

6060
const message = MESSAGES[demoIDX]
61-
return <SettingsBlock title={MESSAGE_TITLES[demoIDX]}><Markdown content={message}/></SettingsBlock>
61+
return <SettingsBlock title={MESSAGE_TITLES[demoIDX]} ariaLabel="welcome-message"><Markdown content={message}/></SettingsBlock>
6262

6363
}
6464

web/src/components/common/Markdown.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function LinkRenderer(props: any) {
2323
return (
2424
<a href={props.href} target="_blank" rel="minusxapp">
2525
{/* <Button leftIcon={<BsBarChartFill />} size={"xs"} colorScheme={"minusxGreen"}>{props.children}</Button> */}
26-
<Tag size='sm' colorScheme='minusxGreen' variant='solid' border={"1px solid #fff"}>
26+
<Tag size='sm' colorScheme='minusxGreen' variant='solid' border={"1px solid #fff"} aria-label='card-link'>
2727
<TagLeftIcon as={BsBarChartFill} />
2828
<TagLabel>{props.children}</TagLabel>
2929
</Tag>
@@ -80,10 +80,10 @@ function ModifiedCode(props: any) {
8080
const text = props.children?.toString() || '';
8181

8282
if (text.startsWith('[badge]')) {
83-
return <Badge color={"minusxGreen.600"}>{text.replace('[badge]', '')}</Badge>;
83+
return <Badge color={"minusxGreen.600"} aria-label='mx-badge'>{text.replace('[badge]', '')}</Badge>;
8484
}
8585
if (text.startsWith('[badge_mx]')) {
86-
return <><br></br><Badge borderLeftColor={"minusxGreen.600"} borderLeft={"2px solid"} color={"minusxGreen.600"} fontSize={"sm"} mt={2}>{text.replace('[badge_mx]', '')}</Badge><br></br></>;
86+
return <><br></br><Badge aria-label='mx-badge' borderLeftColor={"minusxGreen.600"} borderLeft={"2px solid"} color={"minusxGreen.600"} fontSize={"sm"} mt={2}>{text.replace('[badge_mx]', '')}</Badge><br></br></>;
8787
}
8888
}
8989

web/src/components/common/Suggestions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const Suggestions = ({ title, suggestions, onSuggestionClick }: {title: s
2222
onSuggestionClick?.(suggestion)
2323
};
2424
return (
25-
<Flex wrap="wrap" gap={2}>
25+
<Flex wrap="wrap" gap={2} aria-label='suggestions'>
2626
<HStack justifyContent={"space-between"} width={"100%"}>
2727
<HStack color="minusxGreen.500">
2828
<HiMiniSparkles/>

0 commit comments

Comments
 (0)