Skip to content

Commit

Permalink
fix: Improve accessibility in patches page (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
JMarques1196 committed Dec 31, 2023
1 parent 3a8ec6b commit 425d0c3
Showing 1 changed file with 28 additions and 19 deletions.
47 changes: 28 additions & 19 deletions src/routes/patches/PatchItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@
<li class="patch-info">🌎 Universal patch</li>
{:else}
{#each patch.compatiblePackages as pkg}
<a
href="https://play.google.com/store/apps/details?id={pkg.name}"
target="_blank"
rel="noreferrer"
>
<li class="patch-info">📦 {pkg.name}</li>
</a>
<li class="patch-info">
<a
href="https://play.google.com/store/apps/details?id={pkg.name}"
target="_blank"
rel="noreferrer"
>
📦 {pkg.name}
</a>
</li>
{/each}
{/if}

Expand Down Expand Up @@ -71,14 +73,16 @@
</li>
{/if}
{#if patch.compatiblePackages[0].versions.length > 1}
<Button type="text" on:click={() => (showAllVersions = !showAllVersions)}>
<img
class="expand-arrow"
style:transform={showAllVersions ? 'rotate(90deg)' : 'rotate(-90deg)'}
src="/icons/expand_more.svg"
alt="dropdown"
/>
</Button>
<li class="button">
<Button type="text" on:click={() => (showAllVersions = !showAllVersions)}>
<img
class="expand-arrow"
style:transform={showAllVersions ? 'rotate(90deg)' : 'rotate(-90deg)'}
src="/icons/expand_more.svg"
alt="dropdown"
/>
</Button>
</li>
{/if}
{:else}
<li class="patch-info">🎯 Any</li>
Expand Down Expand Up @@ -117,6 +121,10 @@
color: var(--accent-color-two);
}
.button {
display: flex;
align-items: center;
}
.patch-info {
display: flex;
justify-content: center;
Expand All @@ -136,11 +144,12 @@
a {
text-decoration: none;
}
color: var(--grey-five);
a .patch-info:hover {
text-decoration: underline var(--accent-color-two);
color: var(--accent-color-two);
&:hover {
text-decoration: underline var(--accent-color-two);
color: var(--accent-color-two);
}
}
.info-container {
Expand Down

0 comments on commit 425d0c3

Please sign in to comment.