Skip to content

Commit

Permalink
fix: remove invalid role on input (#1320)
Browse files Browse the repository at this point in the history
* remove invalid role on input

* chore: update search snapshot

Co-authored-by: Lee Chase <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 26, 2022
1 parent f1ff58c commit 4b94b37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
18 changes: 9 additions & 9 deletions packages/core/__tests__/__snapshots__/cv-search.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`CvSearch should render correctly when \`clearAriaLabel\` is set 1`] = `
<!---->
<div class="bx--search-magnifier">
<search20-stub class="bx--search-magnifier-icon"></search20-stub>
</div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" role="search" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="test clear aria label" aria-label="test clear aria label" class="bx--search-close">
</div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="test clear aria label" aria-label="test clear aria label" class="bx--search-close">
<close16-stub></close16-stub>
</button>
</div>
Expand All @@ -19,7 +19,7 @@ exports[`CvSearch should render correctly when \`formItem\` is false 1`] = `
<!---->
<div class="bx--search-magnifier">
<search20-stub class="bx--search-magnifier-icon"></search20-stub>
</div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" role="search" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
</div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
<close16-stub></close16-stub>
</button>
</div>
Expand All @@ -31,7 +31,7 @@ exports[`CvSearch should render correctly when \`kind\` is toolbar 1`] = `
<div aria-labelledby="test-1" role="search" class="bx--search bx--search--xl bx--toolbar-search"><button type="button" aria-label="Toolbar search" class="bx--toolbar-search__btn">
<anonymous-stub class="bx--search-magnifier"></anonymous-stub>
</button>
<!----> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" role="search" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
<!----> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
<close16-stub></close16-stub>
</button></div>
</cv-wrapper-stub>
Expand All @@ -43,7 +43,7 @@ exports[`CvSearch should render correctly when \`placeholder\` is set 1`] = `
<!---->
<div class="bx--search-magnifier">
<search20-stub class="bx--search-magnifier-icon"></search20-stub>
</div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" role="search" placeholder="test placeholder" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
</div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" placeholder="test placeholder" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
<close16-stub></close16-stub>
</button>
</div>
Expand All @@ -56,7 +56,7 @@ exports[`CvSearch should render correctly when \`size\` is large 1`] = `
<!---->
<div class="bx--search-magnifier">
<search20-stub class="bx--search-magnifier-icon"></search20-stub>
</div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" role="search" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
</div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
<close16-stub></close16-stub>
</button>
</div>
Expand All @@ -69,7 +69,7 @@ exports[`CvSearch should render correctly when \`size\` is small 1`] = `
<!---->
<div class="bx--search-magnifier">
<search20-stub class="bx--search-magnifier-icon"></search20-stub>
</div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" role="search" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
</div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
<close16-stub></close16-stub>
</button>
</div>
Expand All @@ -82,7 +82,7 @@ exports[`CvSearch should render correctly when \`size\` is xl 1`] = `
<!---->
<div class="bx--search-magnifier">
<search20-stub class="bx--search-magnifier-icon"></search20-stub>
</div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" role="search" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
</div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
<close16-stub></close16-stub>
</button>
</div>
Expand All @@ -94,7 +94,7 @@ exports[`CvSearch should render correctly when \`toolbarAriaLabel\` is set 1`] =
<div aria-labelledby="test-1" role="search" class="bx--search bx--search--xl bx--toolbar-search"><button type="button" aria-label="test toolbar aria label" class="bx--toolbar-search__btn">
<anonymous-stub class="bx--search-magnifier"></anonymous-stub>
</button>
<!----> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" role="search" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
<!----> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close">
<close16-stub></close16-stub>
</button></div>
</cv-wrapper-stub>
Expand All @@ -106,7 +106,7 @@ exports[`CvSearch should render correctly with only \`value\` prop set 1`] = `
<!---->
<div class="bx--search-magnifier"><svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="20" height="20" viewBox="0 0 32 32" aria-hidden="true" class="bx--search-magnifier-icon">
<path d="M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z"></path>
</svg></div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" role="search" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close"><svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="16" height="16" viewBox="0 0 32 32" aria-hidden="true">
</svg></div> <label for="test-1" class="bx--label"></label> <input id="test-1" type="text" placeholder="Search" aria-labelledby="test-1" class="bx--search-input"> <button type="button" title="Clear search input" aria-label="Clear search input" class="bx--search-close"><svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="16" height="16" viewBox="0 0 32 32" aria-hidden="true">
<path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>
</svg></button>
</div>
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/components/cv-search/cv-search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
v-model="internalValue"
v-on="inputListeners"
type="text"
role="search"
ref="input"
:placeholder="placeholder"
:aria-labelledby="uid"
Expand Down

0 comments on commit 4b94b37

Please sign in to comment.