Skip to content

Commit

Permalink
chore(a11y): ignore svelte@4 a11y warnings (#1769)
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym authored Jul 13, 2023
1 parent 9f71930 commit 174ed3a
Show file tree
Hide file tree
Showing 71 changed files with 77 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Accordion/Accordion.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
on:mouseleave
/>
{:else}
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<ul
class:bx--accordion="{true}"
class:bx--accordion--start="{align === 'start'}"
Expand Down
1 change: 1 addition & 0 deletions src/Accordion/AccordionSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<ul
class:bx--skeleton="{true}"
class:bx--accordion="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/Breadcrumb/Breadcrumb.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
on:mouseleave
/>
{:else}
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<nav
aria-label="Breadcrumb"
{...$$restProps}
Expand Down
1 change: 1 addition & 0 deletions src/Breadcrumb/BreadcrumbItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<li
class:bx--breadcrumb-item="{true}"
class:bx--breadcrumb-item--current="{isCurrentPage &&
Expand Down
1 change: 1 addition & 0 deletions src/Breadcrumb/BreadcrumbSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--skeleton="{true}"
class:bx--breadcrumb="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/Button/Button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
<slot props="{buttonProps}" />
{:else if href && !disabled}
<!-- svelte-ignore a11y-missing-attribute -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<a
bind:this="{ref}"
{...buttonProps}
Expand Down
1 change: 1 addition & 0 deletions src/Button/ButtonSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
{""}
</a>
{:else}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--skeleton="{true}"
class:bx--btn="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/Checkbox/Checkbox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
on:mouseleave
/>
{:else}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--form-item="{true}"
class:bx--checkbox-wrapper="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/Checkbox/CheckboxSkeleton.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--form-item="{true}"
class:bx--checkbox-wrapper="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/CodeSnippet/CodeSnippet.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
</button>
{/if}
{:else}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--snippet="{true}"
class:bx--snippet--expand="{expanded}"
Expand Down
1 change: 1 addition & 0 deletions src/CodeSnippet/CodeSnippetSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--skeleton="{true}"
class:bx--snippet="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/ComposedModal/ComposedModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
}}"
>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<div
bind:this="{innerModal}"
role="dialog"
Expand Down
1 change: 1 addition & 0 deletions src/DataTable/DataTableSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
</section>
{/if}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<table
class:bx--skeleton="{true}"
class:bx--data-table="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/DataTable/TableHead.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<thead {...$$restProps} on:click on:mouseover on:mouseenter on:mouseleave>
<slot />
</thead>
2 changes: 2 additions & 0 deletions src/DatePicker/DatePicker.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@
/>
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--form-item="{true}"
{...$$restProps}
Expand All @@ -246,6 +247,7 @@
on:mouseenter
on:mouseleave
>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
bind:this="{datePickerRef}"
id="{id}"
Expand Down
1 change: 1 addition & 0 deletions src/DatePicker/DatePickerSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--form-item="{true}"
{...$$restProps}
Expand Down
1 change: 1 addition & 0 deletions src/Dropdown/DropdownSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--skeleton="{true}"
class:bx--dropdown-v2="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/FileUploader/FileUploader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--form-item="{true}"
{...$$restProps}
Expand Down
1 change: 1 addition & 0 deletions src/FileUploader/FileUploaderButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
</script>

<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<label
aria-disabled="{disabled}"
for="{id}"
Expand Down
2 changes: 2 additions & 0 deletions src/FileUploader/FileUploaderDropContainer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
let over = false;
</script>

<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--file="{true}"
{...$$restProps}
Expand Down Expand Up @@ -82,6 +83,7 @@
}}"
>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<label
for="{id}"
tabindex="{tabindex}"
Expand Down
1 change: 1 addition & 0 deletions src/FileUploader/FileUploaderItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
id="{id}"
class:bx--file__selected-file="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/FileUploader/FileUploaderSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--form-item="{true}"
{...$$restProps}
Expand Down
1 change: 1 addition & 0 deletions src/Form/Form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<form
class:bx--form="{true}"
bind:this="{ref}"
Expand Down
1 change: 1 addition & 0 deletions src/FormGroup/FormGroup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<fieldset
data-invalid="{invalid || undefined}"
class:bx--fieldset="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/FormItem/FormItem.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--form-item="{true}"
{...$$restProps}
Expand Down
1 change: 1 addition & 0 deletions src/FormLabel/FormLabel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<label
class:bx--label="{true}"
for="{id}"
Expand Down
1 change: 1 addition & 0 deletions src/InlineLoading/InlineLoading.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--inline-loading="{true}"
aria-live="assertive"
Expand Down
1 change: 1 addition & 0 deletions src/Link/Link.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
{#if disabled}
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<p
bind:this="{ref}"
class:bx--link="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/ListBox/ListBoxMenuIcon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
translateWithId?.(translationId) ?? defaultTranslations[translationId];
</script>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--list-box__menu-icon="{true}"
class:bx--list-box__menu-icon--open="{open}"
Expand Down
1 change: 1 addition & 0 deletions src/ListItem/ListItem.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<li
class:bx--list__item="{true}"
{...$$restProps}
Expand Down
1 change: 1 addition & 0 deletions src/NumberInput/NumberInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--form-item="{true}"
on:click
Expand Down
1 change: 1 addition & 0 deletions src/NumberInput/NumberInputSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--form-item="{true}"
{...$$restProps}
Expand Down
1 change: 1 addition & 0 deletions src/OrderedList/OrderedList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<ol
class:bx--list--ordered="{!native}"
class:bx--list--ordered--native="{native}"
Expand Down
1 change: 1 addition & 0 deletions src/OverflowMenu/OverflowMenuItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
>
{#if href}
<!-- svelte-ignore a11y-missing-attribute -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<a
bind:this="{ref}"
{...buttonProps}
Expand Down
1 change: 1 addition & 0 deletions src/Pagination/PaginationSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--pagination="{true}"
class:bx--skeleton="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/ProgressIndicator/ProgressIndicator.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<ul
class:bx--progress="{true}"
class:bx--progress--vertical="{vertical}"
Expand Down
1 change: 1 addition & 0 deletions src/ProgressIndicator/ProgressIndicatorSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<ul
class:bx--progress="{true}"
class:bx--progress--vertical="{vertical}"
Expand Down
1 change: 1 addition & 0 deletions src/RadioButton/RadioButtonSkeleton.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--radio-button-wrapper="{true}"
{...$$restProps}
Expand Down
1 change: 1 addition & 0 deletions src/RadioButtonGroup/RadioButtonGroup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
id="{id}"
class:bx--form-item="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/Search/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
class="{searchClass}"
>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
bind:this="{searchRef}"
class:bx--search-magnifier="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/Search/SearchSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--skeleton="{true}"
class:bx--search--sm="{size === 'sm'}"
Expand Down
1 change: 1 addition & 0 deletions src/Select/SelectSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--form-item="{true}"
{...$$restProps}
Expand Down
1 change: 1 addition & 0 deletions src/SkeletonPlaceholder/SkeletonPlaceholder.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--skeleton__placeholder="{true}"
{...$$restProps}
Expand Down
2 changes: 2 additions & 0 deletions src/SkeletonText/SkeletonText.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
{#if paragraph}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div {...$$restProps} on:click on:mouseover on:mouseenter on:mouseleave>
{#each rows as { width }}
<p
Expand All @@ -38,6 +39,7 @@
{/each}
</div>
{:else}
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<p
class:bx--skeleton__text="{true}"
class:bx--skeleton__heading="{heading}"
Expand Down
1 change: 1 addition & 0 deletions src/Slider/Slider.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
/>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--form-item="{true}"
{...$$restProps}
Expand Down
1 change: 1 addition & 0 deletions src/Slider/SliderSkeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--form-item="{true}"
{...$$restProps}
Expand Down
1 change: 1 addition & 0 deletions src/StructuredList/StructuredList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
</script>

<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<div
role="table"
class:bx--structured-list="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/StructuredList/StructuredListBody.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<div
role="rowgroup"
class:bx--structured-list-tbody="{true}"
Expand Down
1 change: 1 addition & 0 deletions src/StructuredList/StructuredListHead.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<div
role="rowgroup"
class:bx--structured-list-thead="{true}"
Expand Down
Loading

0 comments on commit 174ed3a

Please sign in to comment.