The last product I worked on, we had constant problems sometimes trying to reproduce bugs. Accessing a feature through a keyboard shortcut vs. a menu might take you down a completely different code path, and it was critical to know which way the user was using.
Re:Settings are not a design failure
by freedomben on Thursday February 03, 2022 @02:04PM
(#30197084)
Yes I agree, although having gone through that several times in different frameworks, I am now a believer that you can avoid the majority of issues like that by keeping state centralized (like redux pattern) and building components in a functional-reactive way (no state in components). Of course this doesn't help much if you're using Java Swing, but the vast majority of products that I run into this are web-based. The "always re-render" approach of React can help a ton. With that you have two separate event handlers (one for the click, one for the key press) but both of them simply update the "state" variable for whatever it is. The framework then figures out what needs to change and does it.
Re:Settings are not a design failure
by mixmastamyk on Friday February 04, 2022 @12:14AM
(#30203152)
Sounds like a poor design. The events should call the same function.
Around the time I started becoming aware of this, I once brought up in a meeting that I thought we should support keyboard shortcuts for users who prefer keyboard interaction. You would have thought I had desecrated a religious symbol.
I did figure out a hack though. The next time we met I pretended like the previous conversation had never happened, and instead brought up that for a11y we really needed keyboard shortcuts :-D They had no choice but to agree because prioritizing a11y is another religious tenet. I love a good win-win/two birds/etc.