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
+47 -30

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>
+44 -28
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,16 +233,18 @@
</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">
<Icon src={UserCircle} mini width={16} /> Profile <Icon src={UserCircle} mini width={16} /> Profile
</MenuButton> </MenuButton>
<MenuButton link href="/inbox"> <MenuButton link href="/inbox">
@@ -269,10 +275,10 @@
src={$theme == 'system' src={$theme == 'system'
? ComputerDesktop ? ComputerDesktop
: $theme == 'light' : $theme == 'light'
? Sun ? Sun
: $theme == 'dark' : $theme == 'dark'
? Moon ? Moon
: Moon} : Moon}
mini mini
size="16" size="16"
/> />
@@ -301,25 +307,35 @@
<div class="flex flex-row gap-2 w-full items-center"> <div class="flex flex-row gap-2 w-full items-center">
<!-- svelte-ignore missing-declaration --> <!-- svelte-ignore missing-declaration -->
<div class="flex-1"> <div class="flex-1">
<button <button
class="hover:brightness-110 transition-all" class="hover:brightness-110 transition-all"
on:click={() => { on:click={() => {
navigator?.clipboard?.writeText(__VERSION__) navigator?.clipboard?.writeText(__VERSION__)
toast({ content: 'Copied version to clipboard.' }) toast({ content: 'Copied version to clipboard.' })
}} }}
>
<Badge>{__VERSION__}</Badge>
</button>
</div>
<Button
color="tertiary"
href="https://buymeacoffee.com/xylight"
title="Donate"
size="square-md"
> >
<Badge>{__VERSION__}</Badge> <Icon src={Heart} size="16" mini />
</button> </Button>
</div> <Button
<Button color="tertiary" href="https://buymeacoffee.com/xylight" title="Donate" size="square-md"> color="tertiary"
<Icon src={Heart} size="16" mini /> href="https://github.com/Xyphyn/Photon"
</Button> title="GitHub"
<Button color="tertiary" href="https://github.com/Xyphyn/Photon" title="GitHub" size="square-md"> size="square-md"
<Icon src={CodeBracketSquare} size="16" mini /> >
</Button> <Icon src={CodeBracketSquare} size="16" mini />
<Button color="tertiary" href="/about" title="About" size="square-md"> </Button>
<Icon src={InformationCircle} size="16" mini /> <Button color="tertiary" href="/about" title="About" size="square-md">
</Button> <Icon src={InformationCircle} size="16" mini />
</Button>
</div> </div>
</li> </li>
</Menu> </Menu>