kopia lustrzana https://github.com/cloudflare/wildebeest
add alt to avatar img elements
rodzic
86e8ea218c
commit
4aa6263c2d
|
@ -26,7 +26,7 @@ export default component$((props: Props) => {
|
|||
<div onClick$={handleContentClick}>
|
||||
<div class="flex justify-between mb-3">
|
||||
<div class="flex">
|
||||
<Avatar src={status.account.avatar} />
|
||||
<Avatar accountDisplayName={status.account.display_name} src={status.account.avatar} />
|
||||
<div class="flex-col ml-3">
|
||||
<div>
|
||||
{/* TODO: this should either have an href or not being an `a` element (also consider using QwikCity's `Link` instead) */}
|
||||
|
|
|
@ -2,8 +2,9 @@ import { component$ } from '@builder.io/qwik'
|
|||
|
||||
type Props = {
|
||||
src: string
|
||||
accountDisplayName: string
|
||||
}
|
||||
|
||||
export const Avatar = component$<Props>(({ src }) => {
|
||||
return <img class="rounded h-12 w-12" src={src} />
|
||||
export const Avatar = component$<Props>(({ src, accountDisplayName }) => {
|
||||
return <img class="rounded h-12 w-12" src={src} alt={`Avatar of ${accountDisplayName}`} />
|
||||
})
|
||||
|
|
|
@ -36,7 +36,7 @@ export default component$(() => {
|
|||
<div class="bg-wildebeest-700 p-4">
|
||||
{/* Account Card */}
|
||||
<div class="flex">
|
||||
<Avatar src={status.account.avatar} />
|
||||
<Avatar accountDisplayName={status.account.display_name} src={status.account.avatar} />
|
||||
<div class="flex flex-col">
|
||||
<div class="p-1">
|
||||
{/* TODO: this should either have an href or not being an `a` element (also consider using QwikCity's `Link` instead) */}
|
||||
|
|
Ładowanie…
Reference in New Issue