Skip to content

Commit dc604ab

Browse files
committed
Replace titles with ARIA-labels
1 parent 3bbd56c commit dc604ab

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
@@ -16,7 +16,6 @@
1616
type="button"
1717
class="btn btn-sm variant-filled-primary rounded-full order-last"
1818
aria-label="Open menu to hide/show columns"
19-
title="Open menu to hide/show columns"
2019
use:popup={popupCombobox}>Columns</button
2120
>
2221

src/lib/components/Table/TableContent.svelte

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@
411411
id="{tableId}-searchReset"
412412
class="absolute right-3 items-center"
413413
aria-label="Clear search"
414-
title="Clear search"
415414
on:click|preventDefault={() => {
416415
if (serverSide && !sendModel) {
417416
throw new Error('Server-side configuration is missing');
@@ -428,7 +427,7 @@
428427
type="submit"
429428
id="{tableId}-searchSubmit"
430429
class="btn variant-filled-primary"
431-
title="Search"
430+
aria-label="Search"
432431
on:click|preventDefault={() => {
433432
if (serverSide && !sendModel) {
434433
throw new Error('Server-side configuration is missing');
@@ -470,7 +469,7 @@
470469
<button
471470
type="button"
472471
class="btn btn-sm variant-filled-primary rounded-full order-last"
473-
title="Reset sizing of columns and rows"
472+
aria-label="Reset sizing of columns and rows"
474473
on:click|preventDefault={() =>
475474
resetResize($headerRows, $pageRows, tableId, columns, resizable)}
476475
>Reset sizing</button
@@ -480,7 +479,7 @@
480479
<button
481480
type="button"
482481
class="btn btn-sm variant-filled-primary rounded-full order-last"
483-
title="Export table data as CSV"
482+
aria-label="Export table data as CSV"
484483
on:click|preventDefault={() => exportAsCsv(tableId, $exportedData)}
485484
>Export as CSV</button
486485
>

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
@@ -290,7 +286,6 @@
290286
<div
291287
class="btn variant-filled-warning btn-sm h-full"
292288
aria-label="Remove filter"
293-
title="Remove filter"
294289
on:click|preventDefault={() => removeFilter(dropdown.option)}
295290
on:keydown|preventDefault={() => removeFilter(dropdown.option)}
296291
>
@@ -306,7 +301,6 @@
306301
on:input={(e) => valueChangeHandler(e, index)}
307302
bind:value={dropdown.value}
308303
aria-label="Filter value"
309-
title="Filter value"
310304
/>
311305
{:else}
312306
<input
@@ -315,7 +309,6 @@
315309
on:input={(e) => valueChangeHandler(e, index)}
316310
bind:value={dropdown.formValue}
317311
aria-label="Filter value"
318-
title="Filter value"
319312
/>
320313
{/if}
321314
</div>
@@ -335,7 +328,6 @@
335328
addFilter(remainingFilters[0].value, undefined);
336329
}}
337330
aria-label="Add filter"
338-
title="Add filter"
339331
>
340332
<div class="flex gap-1 items-center"><Fa icon={faPlus} />Add Filter</div>
341333
</div>
@@ -344,7 +336,6 @@
344336
class="btn variant-filled-primary btn-sm"
345337
type="button"
346338
aria-label="Apply filters"
347-
title="Apply filters"
348339
on:click|preventDefault={() => {
349340
$pageIndex = 0;
350341
$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)