Skip to content

Commit

Permalink
✨ Feature #54: icon hover label (aria label)
Browse files Browse the repository at this point in the history
  • Loading branch information
terryli710 committed Oct 4, 2023
1 parent 8808249 commit 435d0a9
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/components/icons/ChevronsDownUp.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
import LucideIcon from './LucideIcon.svelte';
export let width = "24";
export let height = "24";
export let ariaLabel = "chevrons-down-up";
const svgPath = `
<path d="m7 20 5-5 5 5" />
<path d="m7 4 5 5 5-5" />
`;
</script>

<LucideIcon width={width} height={height} svgPath={svgPath} ariaLabel="chevrons-down-up" class="task-card-icon" />
<LucideIcon width={width} height={height} svgPath={svgPath} ariaLabel={ariaLabel} class="task-card-icon" />
3 changes: 2 additions & 1 deletion src/components/icons/ChevronsUpDown.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import LucideIcon from './LucideIcon.svelte';
export let width = "24";
export let height = "24";
export let ariaLabel = "chevrons-up-down";
const svgPath = `
<path d="m7 15 5 5 5-5"/>
<path d="m7 9 5-5 5 5"/>
`;
</script>
<LucideIcon width={width} height={height} svgPath={svgPath} ariaLabel="chevrons-up-down" class="task-card-icon" />
<LucideIcon width={width} height={height} svgPath={svgPath} ariaLabel={ariaLabel} class="task-card-icon" />
3 changes: 2 additions & 1 deletion src/components/icons/MoreVertical.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
import LucideIcon from './LucideIcon.svelte';
export let width = "24";
export let height = "24";
export let ariaLabel = "more-vertical";
const svgPath = `
<circle cx="12" cy="12" r="1"/>
<circle cx="12" cy="5" r="1"/>
<circle cx="12" cy="19" r="1"/>
`;
</script>

<LucideIcon width={width} height={height} svgPath={svgPath} ariaLabel="more-vertical" class="task-card-icon" />
<LucideIcon width={width} height={height} svgPath={svgPath} ariaLabel={ariaLabel} class="task-card-icon" />
3 changes: 2 additions & 1 deletion src/components/icons/Plus.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
import LucideIcon from './LucideIcon.svelte';
export let width = "24";
export let height = "24";
export let ariaLabel = "plus";
const svgPath = `
<path d="M5 12h14"/>
<path d="M12 5v14"/>
`;
</script>

<LucideIcon width={width} height={height} svgPath={svgPath} ariaLabel="plus" class="task-card-icon" />
<LucideIcon width={width} height={height} svgPath={svgPath} ariaLabel={ariaLabel} class="task-card-icon" />

2 changes: 1 addition & 1 deletion src/ui/Labels.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
/>
{:else}
<button class="task-card-button label-plus-button" on:click={enableLabelAddMode}>
<Plus/>
<Plus ariaLabel="Add Label"/>
</button>
{/if}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/ui/StaticTaskCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
class="task-card-button mode-toggle-button"
on:click={(event) => switchMode(event, 'multi-line')}
>
<ChevronsUpDown />
<ChevronsUpDown ariaLabel="Toggle Task Display Mode" />
</button>
</div>
</div>
Expand Down Expand Up @@ -246,7 +246,7 @@
class="task-card-button mode-toggle-button"
on:click={(event) => switchMode(event, 'single-line')}
>
<ChevronsDownUp />
<ChevronsDownUp ariaLabel="Toggle Task Display Mode" />
</button>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/ui/TaskCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
<Description taskSyncManager={taskSyncManager} />
{/if}
<button class="task-card-menu-button mode-multi-line" on:click={(event) => showCardMenu(event)} tabindex="0">
<MoreVertical/>
<MoreVertical ariaLabel="Show Menu"/>
</button>
</div>

Expand All @@ -244,7 +244,7 @@
</div>
<div class="task-card-attribute-bottom-bar-right">
<button class="task-card-button mode-toggle-button" on:click={(event) => switchMode(event, 'single-line')}>
<ChevronsDownUp/>
<ChevronsDownUp ariaLabel="Toggle Task Display Mode"/>
</button>
</div>
</div>
Expand Down

0 comments on commit 435d0a9

Please sign in to comment.