I'm trying to understand how to respond to tab key navigation, but am not sure which event is triggered when an element receives focus via the tab key .
In the code linked to below, I want all the buttons to grow to full size when the user tabs over any of them. https://codepen.io/anon/pen/YopBaz
In the example, I have the effect working with the mouse ':hover' psuedo class, but am not sure how to achieve the same effect for the tab highlighted event. I've tried watching for all ( active/ focus / hover ) events on the parent div element when the tab selection is focused on any one of it's child elements. This hasn't worked for me, so I'm wondering is there an event that perhaps bubbles up to the parent of the element highlighted with 'tab' selection?
The relevant css is:
.speed-unit-selector .btn.active, .speed-unit-selector .btn:hover, .speed-unit-selector:active .btn,
.speed-unit-selector:hover .btn,
.speed-unit-selector:focus .btn {
transform: scale(1, 1);
}
Thanks for any insights!