Start with the still card. Its title is visible, the link works, and a border changes when you reach it with the keyboard. Once those parts work, add a small image zoom for readers whose device hasn’t asked to reduce motion. The advantage of putting the zoom inside the media query is that the still state never starts a transform.
Keep the caption and the focus ring
In this standalone example, the image is decorative because the link text identifies the destination. Put your picture in the sample file path and use a real destination when you adapt it. The wrapper crops the image, while the link’s focus outline sits outside that crop.
<a class="card" href="/work/studio/">
<span class="card-image">
<img src="studio.jpg" alt="">
</span>
Studio tour
</a>
.card {
display: inline-block;
border: 3px solid #637184;
color: #142236;
background: #fff;
}
.card-image { display: block; overflow: hidden; }
.card img { display: block; width: 100%; }
.card:is(:hover, :focus-visible) { border-color: #0049bb; }
.card:focus-visible { outline: 3px solid #0049bb; outline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
.card img { transition: transform 180ms ease-out; }
.card:is(:hover, :focus-visible) img { transform: scale(1.04); }
}
Test the two states in the same browser
Use Tab to reach the link, then Shift+Tab to move away. In the ordinary setting the image should ease in and back, while the outer outline shows the focus position. Change the system motion preference or emulate prefers-reduced-motion: reduce in developer tools and repeat. The image should stay still, while the outline and border still respond. Finally, activate the link with Enter and check the destination.
Setting the transition duration to zero would still jump the picture to the larger size if the scale rule were outside the query. With the rule above, reduced motion keeps the image at its resting scale. If you reuse the pattern for a card with a sliding caption, put the caption in its readable resting position first and apply the same principle.