@primer/view-components 0.16.0-rc.02d1611c → 0.16.0-rc.2dca503d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -288,7 +288,10 @@ class ToolTipElement extends HTMLElement {
288
288
  const showing = isPopoverOpen(this);
289
289
  // Ensures that tooltip stays open when hovering between tooltip and element
290
290
  // WCAG Success Criterion 1.4.13 Hoverable
291
- const shouldShow = event.type === 'mouseenter' || event.type === 'focus';
291
+ const shouldShow = event.type === 'mouseenter' ||
292
+ // Only show tooltip on focus if running in headless browser (for tests) or if focus ring
293
+ // is visible (i.e. if user is using keyboard navigation)
294
+ (event.type === 'focus' && (navigator.webdriver || this.control.matches(':focus-visible')));
292
295
  const isMouseLeaveFromButton = event.type === 'mouseleave' &&
293
296
  event.relatedTarget !== this.control &&
294
297
  event.relatedTarget !== this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/view-components",
3
- "version": "0.16.0-rc.02d1611c",
3
+ "version": "0.16.0-rc.2dca503d",
4
4
  "description": "ViewComponents for the Primer Design System",
5
5
  "main": "app/assets/javascripts/primer_view_components.js",
6
6
  "module": "app/components/primer/primer.js",