Div hover plus button change color works


But with focus not? Any idea why?


The :focus psuedo-class should be attached to button, not div.

I figure it out now!

It can be on div with

<div tabindex="-1">
So when you click on div then the button color is changed.

div:focus button
color: red;

I think need to think other ways to make not just basic UX.