Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[shared]: fix issue #167 #171

Merged
merged 3 commits into from
Mar 13, 2019
Merged

[shared]: fix issue #167 #171

merged 3 commits into from
Mar 13, 2019

Conversation

gnijuohz
Copy link
Contributor

@gnijuohz gnijuohz commented Mar 6, 2019

💔 Breaking Changes

🏆 Enhancements

📜 Documentation

🐛 Bug Fix

Fix issue #167, after this fix, a focus event won't show the tooltip anymore.

An alternative fix I tried was to add && event.type !== 'focus' to the condition here https://github.com/williaster/data-ui/blob/master/packages/shared/src/enhancer/WithTooltip.jsx#L71. In that case clicking on a bar for the first time (focusing it) would move the position of the bar. What do you think about this? @williaster

🏠 Internal

@codecov
Copy link

codecov bot commented Mar 6, 2019

Codecov Report

Merging #171 into master will decrease coverage by 0.43%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #171      +/-   ##
==========================================
- Coverage   80.51%   80.07%   -0.44%     
==========================================
  Files         109      109              
  Lines        2422     2424       +2     
  Branches      568      569       +1     
==========================================
- Hits         1950     1941       -9     
- Misses        291      302      +11     
  Partials      181      181
Impacted Files Coverage Δ
packages/shared/src/enhancer/WithTooltip.jsx 46.87% <0%> (-33.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7abd58...dd8ab83. Read the comment docs.

@codecov
Copy link

codecov bot commented Mar 6, 2019

Codecov Report

Merging #171 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #171   +/-   ##
=======================================
  Coverage   80.51%   80.51%           
=======================================
  Files         109      109           
  Lines        2422     2422           
  Branches      568      568           
=======================================
  Hits         1950     1950           
  Misses        291      291           
  Partials      181      181
Impacted Files Coverage Δ
packages/shared/src/enhancer/WithTooltip.jsx 80% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7abd58...b12d02d. Read the comment docs.

@williaster
Copy link
Owner

@gnijuohz thanks for the PR! I want to pull this and test locally to confirm that accessibility still works. Hopefully can merge in the next couple days.

@williaster
Copy link
Owner

Yeah sorry, this breaks tab-able tooltips entirely which was introduced as a requirement for accessibility.

However it looks like tab-ing doesn't work at all in firefox either, which is another bug in and of itself 😞 I'm a little confused, maybe we need another approach aside from wrapping in <a> tags 🤔

@gnijuohz
Copy link
Contributor Author

gnijuohz commented Mar 8, 2019

Hi @williaster you're right. My previous fix prevents tooltips from showing up on focus. My updated fix should no longer break that.

@williaster
Copy link
Owner

Thanks @gnijuohz ! Pulled again to test and functionally it seems good to me (the movement of the tooltip on click doesn't seem super problematic to me)

@williaster williaster merged commit e657165 into williaster:master Mar 13, 2019
@gnijuohz
Copy link
Contributor Author

Thanks @williaster !

I haven't done much research on focusing elements in svg, what do you think about using tabindex? It seems to have great support from major browsers: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/tabindex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants