Skip to content

Commit b97c5f1

Browse files
authored
Merge pull request #111 from BEXIS2/table
Replace titles with ARIA-labels
2 parents d8306d2 + dc604ab commit b97c5f1

File tree

4 files changed

+3
-20
lines changed

4 files changed

+3
-20
lines changed

src/lib/components/Table/ColumnsMenu.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
title="Hide or show columns"
1818
class="btn btn-sm variant-filled-primary rounded-full order-last"
1919
aria-label="Open menu to hide/show columns"
20-
title="Open menu to hide/show columns"
2120
use:popup={popupCombobox}>Columns</button
2221
>
2322

src/lib/components/Table/TableContent.svelte

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,6 @@
413413
id="{tableId}-searchReset"
414414
class="absolute right-3 items-center"
415415
aria-label="Clear search"
416-
title="Clear search"
417416
on:click|preventDefault={() => {
418417
if (serverSide && !sendModel) {
419418
throw new Error('Server-side configuration is missing');
@@ -431,7 +430,7 @@
431430
title="Search"
432431
id="{tableId}-searchSubmit"
433432
class="btn variant-filled-primary"
434-
title="Search"
433+
aria-label="Search"
435434
on:click|preventDefault={() => {
436435
if (serverSide && !sendModel) {
437436
throw new Error('Server-side configuration is missing');
@@ -475,7 +474,7 @@
475474
type="button"
476475
title="Reset column and row sizing"
477476
class="btn btn-sm variant-filled-primary rounded-full order-last"
478-
title="Reset sizing of columns and rows"
477+
aria-label="Reset sizing of columns and rows"
479478
on:click|preventDefault={() =>
480479
resetResize($headerRows, $pageRows, tableId, columns, resizable)}
481480
>Reset sizing</button
@@ -486,7 +485,7 @@
486485
type="button"
487486
title="Export table data as CSV"
488487
class="btn btn-sm variant-filled-primary rounded-full order-last"
489-
title="Export table data as CSV"
488+
aria-label="Export table data as CSV"
490489
on:click|preventDefault={() => exportAsCsv(tableId, $exportedData)}
491490
>Export as CSV</button
492491
>

src/lib/components/Table/TableFilter.svelte

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@
241241
use:popup={popupFeatured}
242242
id="{popupId}-button"
243243
aria-label="Open filter menu for {id} column"
244-
title="Open filter menu for {id} column"
245244
>
246245
<Fa icon={faFilter} size="12" />
247246
</button>
@@ -252,7 +251,6 @@
252251
class="btn variant-filled-primary btn-sm"
253252
type="button"
254253
aria-label="Clear Filters"
255-
title="Clear Filters"
256254
on:click|preventDefault={() => {
257255
// Set the defaults when cleared
258256
clearFilters();
@@ -271,15 +269,13 @@
271269
<select
272270
class="select border border-primary-500 text-sm p-1"
273271
aria-label="Show rows with value that"
274-
title="Show rows with value that"
275272
on:change={(e) => optionChangeHandler(e, index)}
276273
bind:value={dropdown.option}
277274
>
278275
{#each options[type] as option (option)}
279276
<option
280277
value={option.value}
281278
aria-label={option.label}
282-
title={option.label}
283279
selected={dropdown.option === option.value}
284280
disabled={Object.keys($filters[id]).includes(option.value) &&
285281
dropdown.option !== option.value}>{option.label}</option
@@ -292,7 +288,6 @@
292288
tabindex="0"
293289
class="btn variant-filled-warning btn-sm h-full"
294290
aria-label="Remove filter"
295-
title="Remove filter"
296291
on:click|preventDefault={() => removeFilter(dropdown.option)}
297292
on:keydown|preventDefault={() => removeFilter(dropdown.option)}
298293
>
@@ -308,7 +303,6 @@
308303
on:input={(e) => valueChangeHandler(e, index)}
309304
bind:value={dropdown.value}
310305
aria-label="Filter value"
311-
title="Filter value"
312306
/>
313307
{:else}
314308
<input
@@ -317,7 +311,6 @@
317311
on:input={(e) => valueChangeHandler(e, index)}
318312
bind:value={dropdown.formValue}
319313
aria-label="Filter value"
320-
title="Filter value"
321314
/>
322315
{/if}
323316
</div>
@@ -339,7 +332,6 @@
339332
addFilter(remainingFilters[0].value, undefined);
340333
}}
341334
aria-label="Add filter"
342-
title="Add filter"
343335
>
344336
<div class="flex gap-1 items-center"><Fa icon={faPlus} />Add Filter</div>
345337
</div>
@@ -348,7 +340,6 @@
348340
class="btn variant-filled-primary btn-sm"
349341
type="button"
350342
aria-label="Apply filters"
351-
title="Apply filters"
352343
on:click|preventDefault={() => {
353344
$pageIndex = 0;
354345
$filterValue = $filters[id];

src/lib/components/Table/TablePagination.svelte

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464

6565
<button
6666
aria-label="Open menu to select number of items to display per page"
67-
title="Open menu to select number of items to display per page"
6867
class="btn variant-filled-primary w-20 justify-between"
6968
use:popup={pageSizePopup}
7069
>
@@ -88,7 +87,6 @@
8887
class="btn btn-sm variant-filled-primary"
8988
on:click|preventDefault={goToFirstPage}
9089
aria-label="Go to first page"
91-
title="Go to first page"
9290
disabled={goToFirstPageDisabled}
9391
id="{id}-first"
9492
>
@@ -98,7 +96,6 @@
9896
class="btn btn-sm variant-filled-primary"
9997
id="{id}-previous"
10098
aria-label="Go to previous page"
101-
title="Go to previous page"
10299
on:click|preventDefault={goToPreviousPage}
103100
disabled={goToPreviousPageDisabled}><Fa icon={faAngleLeft} /></button
104101
>
@@ -108,22 +105,19 @@
108105
value={$pageIndex + 1}
109106
max={$pageCount}
110107
aria-label="Current page"
111-
title="Current page"
112108
min={1}
113109
on:change={handleChange}
114110
/>
115111
<button
116112
class="btn btn-sm variant-filled-primary"
117113
id="{id}-next"
118114
aria-label="Go to next page"
119-
title="Go to next page"
120115
on:click|preventDefault={goToNextPage}
121116
disabled={goToNextPageDisabled}><Fa icon={faAngleRight} /></button
122117
>
123118
<button
124119
class="btn btn-sm variant-filled-primary"
125120
aria-label="Go to last page"
126-
title="Go to last page"
127121
id="{id}-last"
128122
on:click|preventDefault={goToLastPage}
129123
disabled={goToLastPageDisabled}><Fa icon={faAnglesRight} /></button

0 commit comments

Comments
 (0)