Skip to content

Commit 1cc7765

Browse files
committed
fix: fix answer styling and semantics
1 parent 05f82bb commit 1cc7765

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

apps/app/src/components/GitHubAvatar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export const GitHubAvatar = ({
1717

1818
const avatarUrl = `https://avatars.githubusercontent.com/u/${socialLogin.github}`;
1919
const alt = firstName
20-
? `Avatar of ${firstName} ${lastName || ""}`.trim()
21-
: `Avatar of user ${id}`;
20+
? `Zdjęcie użytkownika ${firstName} ${lastName || ""}`.trim()
21+
: `Zdjęcie użytkownika ${id}`;
2222

2323
return <Image src={avatarUrl} alt={alt} {...props} />;
2424
};

apps/app/src/components/QuestionAnswers/Answer.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ export const Answer = ({ answer: { mdxContent, createdBy, createdAt, sources } }
1212

1313
return (
1414
<div className="bg-white p-4 shadow-md dark:bg-white-dark">
15-
<div className="flex gap-x-3.5">
15+
<header className="flex gap-x-3.5">
1616
<GitHubAvatar user={createdBy} width={40} height={40} className="rounded-full" />
17-
<div className="flex flex-col items-end justify-center leading-4">
18-
<p className="font-bold text-black dark:text-neutral-200">
17+
<div
18+
className="flex flex-col items-end justify-center leading-4"
19+
title="Autor(-ka) pytania"
20+
>
21+
<span className="font-bold text-black dark:text-neutral-200">
22+
<span className="sr-only">Autor(-ka) pytania: </span>
1923
{createdBy.firstName} {createdBy.lastName}
20-
</p>
24+
</span>
2125
<time
2226
dateTime={creationDate.toISOString()}
2327
aria-label={`Odpowiedź dodano ${formatDate(creationDate, "long")}`}
@@ -27,8 +31,8 @@ export const Answer = ({ answer: { mdxContent, createdBy, createdAt, sources } }
2731
{formatDate(creationDate, "short")}
2832
</time>
2933
</div>
30-
</div>
31-
<div className="mt-4 text-justify">
34+
</header>
35+
<div className="-mx-2 mt-4">
3236
<MarkdownContent source={mdxContent} />
3337
</div>
3438
{sources.length > 0 && (

0 commit comments

Comments
 (0)