fix(dashboard): make default avatars tabindexable for consistency

This commit is contained in:
Jake/Rads 2022-06-27 13:08:43 +02:00
parent 42064c66b0
commit 64ad9374af

View File

@ -47,7 +47,7 @@
{#if item && (item.avatar_url || item.icon)} {#if item && (item.avatar_url || item.icon)}
<img tabindex={0} on:keydown|stopPropagation={(event) => {if (event.key === "Enter") {avatarOpen = true}}} on:click|stopPropagation={toggleAvatarModal} class="rounded-circle avatar" src={icon_url} alt={altText} /> <img tabindex={0} on:keydown|stopPropagation={(event) => {if (event.key === "Enter") {avatarOpen = true}}} on:click|stopPropagation={toggleAvatarModal} class="rounded-circle avatar" src={icon_url} alt={altText} />
{:else} {:else}
<img class="rounded-circle avatar" src={default_avatar} alt="icon (default)" /> <img class="rounded-circle avatar" src={default_avatar} alt="icon (default)" tabindex={0} />
{/if} {/if}
</div> </div>
<Modal isOpen={avatarOpen} toggle={toggleAvatarModal}> <Modal isOpen={avatarOpen} toggle={toggleAvatarModal}>