Skip to content

Commit

Permalink
fix: use of uidMixin without id use (#1009)
Browse files Browse the repository at this point in the history
Co-authored-by: Lee Chase <[email protected]>
  • Loading branch information
lee-chase and lee-chase authored Sep 7, 2020
1 parent 5c3a9a1 commit 397be58
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
]"
:data-target="contentSelector"
:aria-selected="dataSelected ? 'true' : 'false'"
:id="uid"
@click="open"
>
<CvSvg v-if="icon" :svg="icon" :class="`${carbonPrefix}--content-switcher__icon`" height="16" width="16" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<th :aria-sort="internalOrder" :style="skeleton && headingStyle">
<th :aria-sort="internalOrder" :style="skeleton && headingStyle" :id="uid">
<button
type="button"
v-if="sortable"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<tbody v-if="someExpandingRows" class="cv-data-table-row cv-data-table-row--expandable">
<tbody v-if="someExpandingRows" class="cv-data-table-row cv-data-table-row--expandable" :id="uid">
<cv-data-table-row-inner
ref="row"
v-bind="$attrs"
Expand All @@ -23,7 +23,7 @@
</td>
</tr>
</tbody>
<cv-data-table-row-inner v-else ref="row" v-bind="$attrs" v-on="$listeners" class="cv-data-table-row">
<cv-data-table-row-inner v-else ref="row" v-bind="$attrs" v-on="$listeners" class="cv-data-table-row" :id="uid">
<slot />
</cv-data-table-row-inner>
</template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<cv-wrapper :tag-type="formItem ? 'div' : ''" :class="`cv-date-picker ${carbonPrefix}--form-item`">
<cv-wrapper :tag-type="formItem ? 'div' : ''" :class="`cv-date-picker ${carbonPrefix}--form-item`" :id="uid">
<div
:data-date-picker="['single', 'range'].includes(kind)"
:data-date-picker-type="kind"
Expand All @@ -12,6 +12,7 @@
},
]"
ref="date-picker"
:id="formItem ? '' : uid"
>
<div
:class="{
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/cv-dropdown/cv-dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-->

<template>
<div :class="{ [`${carbonPrefix}--form-item`]: formItem }">
<div :class="{ [`${carbonPrefix}--form-item`]: formItem }" :id="uid">
<div
:class="[
`${carbonPrefix}--dropdown__wrapper`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div data-overflow-menu :class="`cv-overflow-menu ${carbonPrefix}--overflow-menu`">
<div data-overflow-menu :class="`cv-overflow-menu ${carbonPrefix}--overflow-menu`" :id="uid">
<button
:class="[
`${carbonPrefix}--overflow-menu__trigger ${carbonPrefix}--tooltip__trigger`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="`cv-toggle ${carbonPrefix}--form-item`">
<div :class="`cv-toggle ${carbonPrefix}--form-item`" :id="uid">
<label
:class="`${carbonPrefix}--toggle__label ${carbonPrefix}--skeleton`"
:for="uid"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="`cv-definition-tooltip ${carbonPrefix}--tooltip--definition ${carbonPrefix}--tooltip--a11y`">
<div :class="`cv-definition-tooltip ${carbonPrefix}--tooltip--definition ${carbonPrefix}--tooltip--a11y`" :id="uid">
<button
:aria-describedby="`${uid}-label`"
:class="[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>

<div
:id="`${uid}`"
:id="uid"
aria-hidden="true"
:data-floating-menu-direction="direction"
:class="[`${carbonPrefix}--tooltip`, { [`${carbonPrefix}--tooltip--shown`]: dataVisible }]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
:aria-expanded="active ? 'true' : 'false'"
@click="gaToggle"
@focusout="gaFocusout"
:id="uid"
>
<slot />
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
:aria-expanded="active ? 'true' : 'false'"
@click="gaToggle"
@focusout="gaFocusout"
:id="uid"
>
<Close20 v-if="dataActive" />
<Menu20 v-if="!dataActive" />
Expand Down

0 comments on commit 397be58

Please sign in to comment.