mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
fix(a11y): resolve accessibility warnings in Svelte 3.50.0 (#1480)
Fixes #1479 * chore(deps-dev): upgrade svelte 3.47.0 -> 3.50.0 * fix(toggle): ignore `a11y-role-has-required-aria-props` warning * fix(header-search): resolve a11y warnings
This commit is contained in:
parent
dbf8283e35
commit
73385bf598
4 changed files with 13 additions and 4 deletions
|
@ -39,7 +39,7 @@
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
"sass": "^1.49.11",
|
"sass": "^1.49.11",
|
||||||
"sveld": "^0.17.2",
|
"sveld": "^0.17.2",
|
||||||
"svelte": "^3.46.6",
|
"svelte": "^3.50.0",
|
||||||
"svelte-check": "^2.8.1",
|
"svelte-check": "^2.8.1",
|
||||||
"typescript": "^4.7.4"
|
"typescript": "^4.7.4"
|
||||||
},
|
},
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
on:mouseenter
|
on:mouseenter
|
||||||
on:mouseleave
|
on:mouseleave
|
||||||
>
|
>
|
||||||
|
<!-- svelte-ignore a11y-role-has-required-aria-props -->
|
||||||
<input
|
<input
|
||||||
role="switch"
|
role="switch"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|
|
@ -61,10 +61,11 @@
|
||||||
|
|
||||||
<div bind:this="{refSearch}" role="search" class:active>
|
<div bind:this="{refSearch}" role="search" class:active>
|
||||||
<label for="search-input" id="search-label">Search</label>
|
<label for="search-input" id="search-label">Search</label>
|
||||||
<div role="combobox" aria-expanded="{active}">
|
<div aria-owns="search-menu" aria-haspopup="menu">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
aria-label="Search"
|
aria-label="Search"
|
||||||
|
aria-expanded="{active}"
|
||||||
tabindex="{active ? '-1' : '0'}"
|
tabindex="{active ? '-1' : '0'}"
|
||||||
class:bx--header__action="{true}"
|
class:bx--header__action="{true}"
|
||||||
class:disabled="{active}"
|
class:disabled="{active}"
|
||||||
|
@ -83,6 +84,8 @@
|
||||||
class:active
|
class:active
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
id="search-input"
|
id="search-input"
|
||||||
|
aria-autocomplete="list"
|
||||||
|
aria-controls="search-menu"
|
||||||
aria-activedescendant="{selectedId}"
|
aria-activedescendant="{selectedId}"
|
||||||
bind:value
|
bind:value
|
||||||
on:change
|
on:change
|
||||||
|
@ -133,7 +136,7 @@
|
||||||
{#if active && results.length > 0}
|
{#if active && results.length > 0}
|
||||||
<ul aria-labelledby="search-label" role="menu" id="search-menu">
|
<ul aria-labelledby="search-label" role="menu" id="search-menu">
|
||||||
{#each results as result, i}
|
{#each results as result, i}
|
||||||
<li>
|
<li role="none">
|
||||||
<a
|
<a
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
id="search-menuitem-{i}"
|
id="search-menuitem-{i}"
|
||||||
|
|
|
@ -1414,11 +1414,16 @@ svelte-preprocess@^4.10.6:
|
||||||
sorcery "^0.10.0"
|
sorcery "^0.10.0"
|
||||||
strip-indent "^3.0.0"
|
strip-indent "^3.0.0"
|
||||||
|
|
||||||
svelte@^3.46.6, svelte@^3.47.0:
|
svelte@^3.47.0:
|
||||||
version "3.49.0"
|
version "3.49.0"
|
||||||
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029"
|
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029"
|
||||||
integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA==
|
integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA==
|
||||||
|
|
||||||
|
svelte@^3.50.0:
|
||||||
|
version "3.50.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.50.0.tgz#d11a7a6bd1e084ec051d55104a9af8bccf54461f"
|
||||||
|
integrity sha512-zXeOUDS7+85i+RxLN+0iB6PMbGH7OhEgjETcD1fD8ZrhuhNFxYxYEHU41xuhkHIulJavcu3PKbPyuCrBxdxskQ==
|
||||||
|
|
||||||
terser@^5.0.0:
|
terser@^5.0.0:
|
||||||
version "5.14.2"
|
version "5.14.2"
|
||||||
resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10"
|
resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue