Skip to content

Commit

Permalink
chore: remove unnecessary aria labels
Browse files Browse the repository at this point in the history
  • Loading branch information
emcelroy committed Dec 4, 2024
1 parent 67d677e commit b102121
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/components/chat-transcript.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ describe("test chat transcript component", () => {
expect(message).toHaveAttribute("aria-label", labelContent);

const speaker = within(message).getByTestId("chat-message-speaker");
expect(speaker).toHaveAttribute("aria-label", "speaker");
expect(speaker).toHaveTextContent(chatTranscript.messages[index].speaker);

const content = within(message).getByTestId("chat-message-content");
expect(content).toHaveAttribute("aria-label", "message");
expect(content).toHaveTextContent(chatTranscript.messages[index].content);
});
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/chat-transcript.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ export const ChatTranscriptComponent = ({chatTranscript}: IProps) => {
key={message.timestamp}
role="listitem"
>
<h3 aria-label="speaker" data-testid="chat-message-speaker">
<h3 data-testid="chat-message-speaker">
{message.speaker}
</h3>
<p aria-label="message" data-testid="chat-message-content">
<p data-testid="chat-message-content">
{message.content}
</p>
</section>
Expand Down

0 comments on commit b102121

Please sign in to comment.