Skip to content

Commit

Permalink
chore: change section elements to div elements
Browse files Browse the repository at this point in the history
  • Loading branch information
emcelroy committed Dec 11, 2024
1 parent c9b2e14 commit 715e42c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/chat-transcript-message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const ChatTranscriptMessage = ({message, showDebugLog}: IProps) => {
const speakerClass = speaker === DEBUG_SPEAKER ? "debug" : speaker.toLowerCase();

return (
<section
<div
aria-label={`${speaker} at ${timestamp}`}
className={`chat-transcript__message ${speakerClass}`}
data-testid="chat-message"
Expand All @@ -59,6 +59,6 @@ export const ChatTranscriptMessage = ({message, showDebugLog}: IProps) => {
<Markdown>{messageContent.content}</Markdown>
}
</div>
</section>
</div>
);
};
10 changes: 5 additions & 5 deletions src/components/chat-transcript.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface IProps {
}

export const ChatTranscriptComponent = observer(({chatTranscript, showDebugLog}: IProps) => {
const chatTranscriptRef = useRef<HTMLElement>(null);
const chatTranscriptRef = useRef<HTMLDivElement>(null);

useEffect(() => {
// Autoscroll to the top of the latest message in the transcript.
Expand All @@ -23,9 +23,9 @@ export const ChatTranscriptComponent = observer(({chatTranscript, showDebugLog}:
}, [chatTranscript.messages.length]);

return (
<section ref={chatTranscriptRef} id="chat-transcript" className="chat-transcript" data-testid="chat-transcript" role="group">
<div ref={chatTranscriptRef} id="chat-transcript" className="chat-transcript" data-testid="chat-transcript" role="group">
<h2 className="visually-hidden">DAVAI Chat Transcript</h2>
<section
<div
// For now we are using "assertive". This may change as we refine the experience.
aria-live="assertive"
className="chat-transcript__messages"
Expand All @@ -41,7 +41,7 @@ export const ChatTranscriptComponent = observer(({chatTranscript, showDebugLog}:
/>
);
})}
</section>
</section>
</div>
</div>
);
});

0 comments on commit 715e42c

Please sign in to comment.