You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// check the specificity of the errors. If there are multiple errors, only return the most specific one.
112
110
if(errors.size>1){
113
-
if(errors.has('anchorTagWithoutHref')){
111
+
if(errors.has('nonInteractiveLink')){
114
112
errors.delete('nonInteractiveTrigger')
115
113
}
116
-
if(errors.has('hiddenInput')){
114
+
if(errors.has('nonInteractiveInput')){
117
115
errors.delete('nonInteractiveTrigger')
118
116
}
119
117
}
@@ -135,11 +133,11 @@ module.exports = {
135
133
],
136
134
messages: {
137
135
nonInteractiveTrigger:
138
-
'The `Tooltip` component expects a single React element that contains interactive content. Consider using a `<button>` or equivalent interactive element instead.',
139
-
anchorTagWithoutHref:
136
+
'Tooltips should only be applied to interactive elements that are not disabled. Consider using a `<button>` or equivalent interactive element instead.',
137
+
nonInteractiveLink:
140
138
'Anchor tags without an href attribute are not interactive, therefore they cannot be used as a trigger for a tooltip. Please add an href attribute or use an alternative interactive element instead',
141
-
hiddenInput:
142
-
'Hidden inputs are not interactive and cannot be used as a trigger for a tooltip. Please use an alternate input type or use a different interactive element instead',
139
+
nonInteractiveInput:
140
+
'Hidden or disabled inputs are not interactive and cannot be used as a trigger for a tooltip. Please use an alternate input type or use a different interactive element instead',
143
141
singleChild: 'The `Tooltip` component expects a single React element as a child.'
0 commit comments