It is easy to ignore focus. Focus is a concept tied to keyboard navigation of a UI. Few developers (or designers) use a phone with a keyboard. “Out of sight, out of mind” means that forgetting about keyboards is very common.
Yet, while phones with keyboards are uncommon, there may be more than you might think of:
- Most Chrome OS devices come with keyboards
- Bluetooth keyboards are a popular accessory for tablets
- Users needing assistive technology will often wind up with a peripheral that either is a keyboard or presents itself to Android as a keyboard
- You may be required by regulation to support keyboard navigation
- Televisions are not touchscreens; navigation through a TV app is via a remote that emits key events
- Game controllers emit key events
- Your future Compose for Desktop app will be tied tightly to keyboards
- And, believe it or not, there are modern phones with keyboards
Jamie Sanson’s post on focus demonstrates that Compose has an in-depth API for focus management. It is our job to test our app’s focus management and make fixes in places where the “out of the box” implementation is shaky. Plus, Compose UI is new, and focus management may not have gotten enough community attention, so there may be bugs, or gaps in functionality where Google postponed some things to address after 1.0.
As you develop your battle plan for migrating to Compose UI in the coming years, try to find time to work on focus management… even if it is not your primary focus.