One colour behind the pointer: what a TV remote taught us about focus highlights
On a phone you tap what you want. On a television you push arrows on a remote, and the only thing telling you where you are is the focus highlight.
In the media player I build (NewTV Player, a React Native app that also runs on Android TV, Fire TV and smart TVs) the highlight was corrected more times than any other part of the app. This post is what we ended up with, and why.
Note: this post was written with help from an AI assistant, from our own project notes and measurements.
The rule
One colour behind the pointer, in any position, on any screen.
That sounds obvious. It broke in three different ways, and all three shipped at some point.
- Ring plus fill
A bright accent border drawn around a see-through accent wash is two colours on one row. On a real screenshot we measured the ring atrgb(246,197,67)around a fill ofrgb(101,87,39). From the sofa it looks like a box inside a box. - Split rows
A row made of several focus targets (a channel name plus a favourite star, say), where each target paints its own background, shows the focused part in the accent colour and its neighbours in the tile colour. Two or three tones across one row. - A competing "active" state
The selected tab or the chosen season painted with a second fill, inside the same bar the highlight moves through, adds a third tone. The eye can't tell which one is "here".
What fixed it
- The fill is the whole highlight. When a focusable view changes its own background, it draws no ring at all.
- The fill is solid, not see-through. We blend the accent into the tile colour at 30% and paint that. A translucent wash took on whatever was underneath, so the same highlight read brown on the dark header and yellow on a lighter card.
- No elevation on a focused target. On Android the shadow is drawn under the view and showed through the fill as a second, darker band inside the highlight. We only caught this on a photo of a real TV.
- A focused target hides its own border (
borderColor: 'transparent'), so an outlined button doesn't keep its outline around the fill. - Chosen items use coloured text or a coloured icon, never a fill of their own. Tabs, search chips, seasons and guide categories all follow this.
- One ground for multi-target rows. A small
FocusRowwrapper paints the tile colour once for the whole row; the children are transparent, and only the focused child paints the highlight. Moving onto a channel colours the channel and leaves the star alone.
Text that sits on the highlight
A warning in red under a playlist name ("Subscription ended") measured 2.29 to 1 contrast on the gold fill, on the very row the pointer starts on.
Instead of putting a box behind it, the text changes itself while its row has focus: the red is moved toward the normal text colour just far enough to reach 4.5 to 1. We measured 4.50 to 4.74 across all four themes and five accent colours. Off the pointer it is the plain red again.
A React Native trap: TouchableOpacity eats focus
TouchableOpacity strips onFocus and onBlur before they reach the underlying view, on purpose, to keep old behaviour. A focus handler on it is never called, so the highlight never appears. Use Pressable, which passes both through. This one cost us a long evening.
How to settle arguments about it
Take a screenshot, then sample pixels across the focused row at several heights, in the gaps between the text. A correct row gives back one distinct colour. A search for the ring colour gives back nothing. It turns "does this look right?" into a test that passes or fails.
If you're building for TV with React Native, I hope this saves you a few rounds. The app is at newtvplayer.com; it's a player for your own playlist and carries no content itself. Questions about the focus code are welcome in the comments.
Comments
No comments yet. Start the discussion.