fix: resolve a11y warnings from Svelte version 3.58 (#1732)

* chore(deps-dev): upgrade svelte to 3.58

* chore(a11y): ignore false positives

Referencing the upstream Carbon React implementation, these warnings can be ignored.

* fix(list-box-menu-item): set `tabindex` to `-1`

* chore: fix `tabindex` capitalization

The Svelte Language server does not detect `tabIndex` as a valid attribute.

Note, however, that `tabIndex` is correct when using it in JavaScript (e.g., `node.tabIndex`).
This commit is contained in:
Eric Liu 2023-05-18 11:53:17 -07:00 committed by GitHub
commit c02b4738bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 16 additions and 13 deletions

View file

@ -22,7 +22,7 @@
"prism-svelte": "^0.4.7",
"prismjs": "^1.28.0",
"remark-slug": "^6.0.0",
"svelte": "^3.57.0",
"svelte": "^3.58.0",
"vite": "^3.0.9"
},
"routify": {

View file

@ -165,7 +165,7 @@ bufferutil@^4.0.1:
node-gyp-build "~3.7.0"
carbon-components-svelte@../:
version "0.73.3"
version "0.73.5"
dependencies:
flatpickr "4.6.9"
@ -1280,10 +1280,10 @@ svelte-hmr@^0.14.12:
resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.14.12.tgz#a127aec02f1896500b10148b2d4d21ddde39973f"
integrity sha512-4QSW/VvXuqVcFZ+RhxiR8/newmwOCTlbYIezvkeN6302YFRE8cXy0naamHcjz8Y9Ce3ITTZtrHrIL0AGfyo61w==
svelte@^3.57.0:
version "3.57.0"
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.57.0.tgz#a3969cfe51f25f2a55e75f7b98dbd02c3af0980b"
integrity sha512-WMXEvF+RtAaclw0t3bPDTUe19pplMlfyKDsixbHQYgCWi9+O9VN0kXU1OppzrB9gPAvz4NALuoca2LfW2bOjTQ==
svelte@^3.58.0:
version "3.58.0"
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.58.0.tgz#d3e6f103efd6129e51c7d709225ad3b4c052b64e"
integrity sha512-brIBNNB76mXFmU/Kerm4wFnkskBbluBDCjx/8TcpYRb298Yh2dztS2kQ6bhtjMcvUhd5ynClfwpz5h2gnzdQ1A==
symbol-tree@^3.2.4:
version "3.2.4"

View file

@ -39,7 +39,7 @@
"sass": "^1.49.11",
"standard-version": "^9.5.0",
"sveld": "^0.18.0",
"svelte": "^3.57.0",
"svelte": "^3.58.0",
"svelte-check": "^2.8.1",
"typescript": "^4.7.4"
},

View file

@ -58,6 +58,7 @@
</script>
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-interactive-supports-focus -->
<div
role="tablist"
class:bx--content-switcher="{true}"

View file

@ -20,6 +20,7 @@
<div
role="option"
tabindex="-1"
class:bx--list-box__menu-item="{true}"
class:bx--list-box__menu-item--active="{active}"
class:bx--list-box__menu-item--highlighted="{highlighted || active}"

View file

@ -62,7 +62,7 @@
<div
bind:this="{ref}"
role="button"
tabIndex="{disabled ? -1 : 0}"
tabindex="{disabled ? -1 : 0}"
class:bx--tag__close-icon="{true}"
on:click|preventDefault|stopPropagation="{(e) => {
if (!disabled) {

View file

@ -27,6 +27,7 @@
<slot />
</label>
{:else}
<!-- svelte-ignore a11y-interactive-supports-focus -->
<div
role="row"
class:bx--structured-list-row="{true}"

View file

@ -254,7 +254,7 @@
on:click|stopPropagation
on:mousedown|stopPropagation
class:bx--tooltip__content="{true}"
tabIndex="-1"
tabindex="-1"
role="dialog"
>
<slot />

View file

@ -2023,10 +2023,10 @@ svelte@^3.52.0:
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.54.0.tgz#b4bcd865bd9e927f9f7b76563288ef5f4d72867a"
integrity sha512-tdrgeJU0hob0ZWAMoKXkhcxXA7dpTg6lZGxUeko5YqvPdJBiyRspGsCwV27kIrbrqPP2WUoSV9ca0gnLlw8YzQ==
svelte@^3.57.0:
version "3.57.0"
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.57.0.tgz#a3969cfe51f25f2a55e75f7b98dbd02c3af0980b"
integrity sha512-WMXEvF+RtAaclw0t3bPDTUe19pplMlfyKDsixbHQYgCWi9+O9VN0kXU1OppzrB9gPAvz4NALuoca2LfW2bOjTQ==
svelte@^3.58.0:
version "3.58.0"
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.58.0.tgz#d3e6f103efd6129e51c7d709225ad3b4c052b64e"
integrity sha512-brIBNNB76mXFmU/Kerm4wFnkskBbluBDCjx/8TcpYRb298Yh2dztS2kQ6bhtjMcvUhd5ynClfwpz5h2gnzdQ1A==
terser@^5.0.0:
version "5.14.2"