misc: improve accessibility

This commit is contained in:
Xylight committed 2024-02-24 10:52:05 -08:00
1 parent d2289fd8a4
commit 11cfd0d9fe
3 files changed
+26 -9

No files matched your search

@@ -37,6 +37,7 @@ ${view == 'list' ? `max-h-24` : 'max-h-48'}`
class="text-black dark:text-white absolute z-10 isolate drop-shadow-xl {expanded class="text-black dark:text-white absolute z-10 isolate drop-shadow-xl {expanded
? 'bottom-6' ? 'bottom-6'
: 'bottom-16'} left-1/2 -translate-x-1/2" : 'bottom-16'} left-1/2 -translate-x-1/2"
title="Expand"
> >
<Icon <Icon
src={ChevronDown} src={ChevronDown}
@@ -47,7 +47,7 @@
class="w-full h-full object-cover bg-slate-200 dark:bg-zinc-800" class="w-full h-full object-cover bg-slate-200 dark:bg-zinc-800"
width={600} width={600}
height={400} height={400}
alt="" alt={embed_title}
class:blur-3xl={nsfw} class:blur-3xl={nsfw}
/> />
</a> </a>
@@ -62,7 +62,7 @@
class="rounded-md max-w-[300px] w-full h-auto aspect-video object-cover bg-slate-200 dark:bg-zinc-800" class="rounded-md max-w-[300px] w-full h-auto aspect-video object-cover bg-slate-200 dark:bg-zinc-800"
width={600} width={600}
height={400} height={400}
alt="" alt={embed_title ?? 'Embed prevented alt text'}
class:blur-3xl={nsfw} class:blur-3xl={nsfw}
/> />
</a> </a>
+23 -7
View File
@@ -59,7 +59,11 @@
style={$$props.style} style={$$props.style}
> >
<div class="flex flex-row gap-2 items-center mr-auto"> <div class="flex flex-row gap-2 items-center mr-auto">
<a href="/" class="flex flex-row items-center gap-2 logo group"> <a
href="/"
class="flex flex-row items-center gap-2 logo group"
title="Home"
>
{#if LINKED_INSTANCE_URL} {#if LINKED_INSTANCE_URL}
{#if $site} {#if $site}
<Avatar <Avatar
@@ -229,13 +233,15 @@
</button> </button>
{#if $profile?.user} {#if $profile?.user}
<div class="flex flex-row gap-2 items-center py-2 mx-4 font-medium"> <div class="flex flex-row gap-2 items-center py-2 mx-4 font-medium">
<Avatar width={22} url={$profile?.user?.local_user_view.person.avatar} alt={$profile?.username} /> <Avatar
width={22}
url={$profile?.user?.local_user_view.person.avatar}
alt={$profile?.username}
/>
{$profile?.user?.local_user_view?.person.name} {$profile?.user?.local_user_view?.person.name}
</div> </div>
{:else} {:else}
<MenuDivider> <MenuDivider>Profile</MenuDivider>
Profile
</MenuDivider>
{/if} {/if}
{#if $profile?.user} {#if $profile?.user}
<MenuButton link href="/profile"> <MenuButton link href="/profile">
@@ -311,10 +317,20 @@
<Badge>{__VERSION__}</Badge> <Badge>{__VERSION__}</Badge>
</button> </button>
</div> </div>
<Button color="tertiary" href="https://buymeacoffee.com/xylight" title="Donate" size="square-md"> <Button
color="tertiary"
href="https://buymeacoffee.com/xylight"
title="Donate"
size="square-md"
>
<Icon src={Heart} size="16" mini /> <Icon src={Heart} size="16" mini />
</Button> </Button>
<Button color="tertiary" href="https://github.com/Xyphyn/Photon" title="GitHub" size="square-md"> <Button
color="tertiary"
href="https://github.com/Xyphyn/Photon"
title="GitHub"
size="square-md"
>
<Icon src={CodeBracketSquare} size="16" mini /> <Icon src={CodeBracketSquare} size="16" mini />
</Button> </Button>
<Button color="tertiary" href="/about" title="About" size="square-md"> <Button color="tertiary" href="/about" title="About" size="square-md">