Skip to content

Commit 806d1d8

Browse files
authored
Merge pull request #3158 from r0hit-gupta/msft259
MSFT-259
2 parents 25d458d + 493f810 commit 806d1d8

File tree

6 files changed

+25
-4
lines changed

6 files changed

+25
-4
lines changed

__tests__/shared/components/ProfilePage/BadgesModal/__snapshots__/index.jsx.snap

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ exports[`renders achievements correctly 1`] = `
6767
/>
6868
}
6969
defaultVisible={false}
70+
id=""
7071
onTooltipHover={[Function]}
7172
placeArrow={[Function]}
7273
position="top"
@@ -91,6 +92,7 @@ exports[`renders achievements correctly 1`] = `
9192
/>
9293
}
9394
defaultVisible={false}
95+
id=""
9496
onTooltipHover={[Function]}
9597
placeArrow={[Function]}
9698
position="top"
@@ -115,6 +117,7 @@ exports[`renders achievements correctly 1`] = `
115117
/>
116118
}
117119
defaultVisible={false}
120+
id=""
118121
onTooltipHover={[Function]}
119122
placeArrow={[Function]}
120123
position="top"
@@ -139,6 +142,7 @@ exports[`renders achievements correctly 1`] = `
139142
/>
140143
}
141144
defaultVisible={false}
145+
id=""
142146
onTooltipHover={[Function]}
143147
placeArrow={[Function]}
144148
position="top"
@@ -163,6 +167,7 @@ exports[`renders achievements correctly 1`] = `
163167
/>
164168
}
165169
defaultVisible={false}
170+
id=""
166171
onTooltipHover={[Function]}
167172
placeArrow={[Function]}
168173
position="top"
@@ -191,6 +196,7 @@ exports[`renders achievements correctly 1`] = `
191196
/>
192197
}
193198
defaultVisible={false}
199+
id=""
194200
onTooltipHover={[Function]}
195201
placeArrow={[Function]}
196202
position="top"
@@ -215,6 +221,7 @@ exports[`renders achievements correctly 1`] = `
215221
/>
216222
}
217223
defaultVisible={false}
224+
id=""
218225
onTooltipHover={[Function]}
219226
placeArrow={[Function]}
220227
position="top"
@@ -239,6 +246,7 @@ exports[`renders achievements correctly 1`] = `
239246
/>
240247
}
241248
defaultVisible={false}
249+
id=""
242250
onTooltipHover={[Function]}
243251
placeArrow={[Function]}
244252
position="top"
@@ -263,6 +271,7 @@ exports[`renders achievements correctly 1`] = `
263271
/>
264272
}
265273
defaultVisible={false}
274+
id=""
266275
onTooltipHover={[Function]}
267276
placeArrow={[Function]}
268277
position="top"
@@ -287,6 +296,7 @@ exports[`renders achievements correctly 1`] = `
287296
/>
288297
}
289298
defaultVisible={false}
299+
id=""
290300
onTooltipHover={[Function]}
291301
placeArrow={[Function]}
292302
position="top"

__tests__/shared/components/challenge-listing/Tooltips/__snapshots__/ProgressBarTooltip.jsx.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ exports[`Matches shallow shapshot 1`] = `
1818
/>
1919
}
2020
defaultVisible={false}
21+
id=""
2122
onTooltipHover={[Function]}
2223
placeArrow={[Function]}
2324
position="top"
@@ -54,6 +55,7 @@ exports[`Matches shallow shapshot 2`] = `
5455
/>
5556
}
5657
defaultVisible={false}
58+
id=""
5759
onTooltipHover={[Function]}
5860
placeArrow={[Function]}
5961
position="top"
@@ -90,6 +92,7 @@ exports[`Matches shallow shapshot 3`] = `
9092
/>
9193
}
9294
defaultVisible={false}
95+
id=""
9396
onTooltipHover={[Function]}
9497
placeArrow={[Function]}
9598
position="top"

__tests__/shared/components/challenge-listing/Tooltips/__snapshots__/TrackAbbreviationTooltip.jsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ exports[`Matches shallow shapshot 1`] = `
1111
/>
1212
}
1313
defaultVisible={false}
14+
id=""
1415
onTooltipHover={[Function]}
1516
placeArrow={[Function]}
1617
position="topLeft"
@@ -40,6 +41,7 @@ exports[`Matches shallow shapshot 2`] = `
4041
/>
4142
}
4243
defaultVisible={false}
44+
id=""
4345
onTooltipHover={[Function]}
4446
placeArrow={[Function]}
4547
position="topLeft"

__tests__/shared/components/challenge-listing/Tooltips/__snapshots__/UserAvatarTooltip.jsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ exports[`Matches shallow shapshot 1`] = `
1818
/>
1919
}
2020
defaultVisible={false}
21+
id=""
2122
onTooltipHover={[Function]}
2223
placeArrow={[Function]}
2324
position="top"
@@ -56,6 +57,7 @@ exports[`Matches shallow shapshot 2`] = `
5657
/>
5758
}
5859
defaultVisible={false}
60+
id=""
5961
onTooltipHover={[Function]}
6062
placeArrow={[Function]}
6163
position="top"

src/shared/components/Tooltip/index.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ function Tooltip({
2121
suppressDiv,
2222
trigger,
2323
defaultVisible,
24+
id,
2425
}) {
2526
return (
2627
<RCTooltip
28+
id={id}
2729
placement={position}
2830
overlay={content}
2931
overlayClassName={className}
@@ -49,6 +51,7 @@ Tooltip.defaultProps = {
4951
position: 'top',
5052
className: '',
5153
content: '',
54+
id: '',
5255
onTooltipHover: _.noop,
5356
placeArrow: _.noop,
5457
suppressDiv: false,
@@ -60,6 +63,7 @@ Tooltip.propTypes = {
6063
align: PT.shape({}),
6164
position: PT.string,
6265
children: PT.node.isRequired,
66+
id: PT.string,
6367
className: PT.string,
6468
content: PT.node,
6569
onTooltipHover: PT.func,

src/shared/components/challenge-detail/Specification/SideBar/index.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ Final Review:
108108
</h3>
109109
<span styleName="link-like-paragraph tooltip-container">
110110
{reviewTypeTitle}
111-
<Tooltip content={reviewTip} trigger={['hover', 'focus']}>
112-
<div styleName="tctooltip" tabIndex="0" role="button">
111+
<Tooltip id="review-tip" content={reviewTip} trigger={['hover', 'focus']}>
112+
<div styleName="tctooltip" tabIndex="0" role="button" aria-describedBy="review-tip">
113113
?
114114
</div>
115115
</Tooltip>
@@ -119,8 +119,8 @@ Approval:
119119
</h3>
120120
<span styleName="link-like-paragraph tooltip-container">
121121
User Sign-Off
122-
<Tooltip content={approvalTip} className={styles['tooltip-overlay']} trigger={['hover', 'focus']}>
123-
<div styleName="tctooltip" tabIndex="0" role="button">
122+
<Tooltip id="approval-tip" content={approvalTip} className={styles['tooltip-overlay']} trigger={['hover', 'focus']}>
123+
<div styleName="tctooltip" tabIndex="0" role="button" aria-describedBy="approval-tip">
124124
?
125125
</div>
126126
</Tooltip>

0 commit comments

Comments
 (0)