|
240 | 240 | type="button" |
241 | 241 | use:popup={popupFeatured} |
242 | 242 | id="{popupId}-button" |
| 243 | + aria-label="Open filter menu for column {id}" |
243 | 244 | > |
244 | 245 | <Fa icon={faFilter} size="12" /> |
245 | 246 | </button> |
|
249 | 250 | <button |
250 | 251 | class="btn variant-filled-primary btn-sm" |
251 | 252 | type="button" |
| 253 | + aria-label="Clear Filters" |
252 | 254 | on:click|preventDefault={() => { |
253 | 255 | // Set the defaults when cleared |
254 | 256 | clearFilters(); |
|
273 | 275 | {#each options[type] as option (option)} |
274 | 276 | <option |
275 | 277 | value={option.value} |
| 278 | + aria-label={option.label} |
276 | 279 | selected={dropdown.option === option.value} |
277 | 280 | disabled={Object.keys($filters[id]).includes(option.value) && |
278 | 281 | dropdown.option !== option.value}>{option.label}</option |
|
282 | 285 | {#if dropdowns.length > 1} |
283 | 286 | <div |
284 | 287 | class="btn variant-filled-warning btn-sm h-full" |
| 288 | + aria-label="Remove filter" |
285 | 289 | on:click|preventDefault={() => removeFilter(dropdown.option)} |
286 | 290 | on:keydown|preventDefault={() => removeFilter(dropdown.option)} |
287 | 291 | > |
|
296 | 300 | class="input p-1 border border-primary-500" |
297 | 301 | on:input={(e) => valueChangeHandler(e, index)} |
298 | 302 | bind:value={dropdown.value} |
| 303 | + aria-label="Filter value" |
299 | 304 | /> |
300 | 305 | {:else} |
301 | 306 | <input |
302 | 307 | type="date" |
303 | 308 | class="input p-1 border border-primary-500" |
304 | 309 | on:input={(e) => valueChangeHandler(e, index)} |
305 | 310 | bind:value={dropdown.formValue} |
| 311 | + aria-label="Filter value" |
306 | 312 | /> |
307 | 313 | {/if} |
308 | 314 | </div> |
|
321 | 327 | on:keydown|stopPropagation={() => { |
322 | 328 | addFilter(remainingFilters[0].value, undefined); |
323 | 329 | }} |
| 330 | + aria-label="Add filter" |
324 | 331 | > |
325 | 332 | <div class="flex gap-1 items-center"><Fa icon={faPlus} />Add Filter</div> |
326 | 333 | </div> |
327 | 334 | {/if} |
328 | 335 | <button |
329 | 336 | class="btn variant-filled-primary btn-sm" |
330 | 337 | type="button" |
| 338 | + aria-label="Apply filters" |
331 | 339 | on:click|preventDefault={() => { |
332 | 340 | $pageIndex = 0; |
333 | 341 | $filterValue = $filters[id]; |
|
0 commit comments