contiamo / operational-ui

Building blocks for effective operational interfaces
https://operational-ui.netlify.com
MIT License
258 stars 47 forks source link

**Fix:** no-focus #1336

Closed stereobooster closed 4 years ago

stereobooster commented 4 years ago

Summary

Related issue

To be tested

Me

Tester 1

Tester 2

mpotomin commented 4 years ago

Can I please have more info how to verify the fix?

stereobooster commented 4 years ago

To verify document.body.classList.add("no-focus"):

On first click on item with no-focus (tree in this case), we can see focus state, which is an error, because we should not see focus state on click (only on keyboard)

Screenshot 2020-05-18 at 11 13 55

Second issue is that, we use use onClick to check that click happened, but onClick is triggered on keyboard ("Enter" or "Space") for buttons, so we hide focus even though user is using keyboard (not sure this is visible in our examples)