Stay up to date with AI tools, model releases, and developer workflows that matter.
It has been revealed that weekly. Free. One click to leave.
According to recent reports, 7 Day Free Trial. Cancel Anytime.
According to recent reports, the product carousel looks finished. The image fills the card, the price sits under the product name, and the arrow on the right takes you to the next item. The demo goes smoothly.
Then you put the mouse down. You press Tab, and focus skips the arrows entirely. If you rely on a keyboard, the first product is the only one you can reach.
That’s a front-end bug hiding in plain sight. It’s also a good illustration of where AI fits into front-end development. A prompt can describe what a component should look like and what should happen on click. The implementation still has to account for how people reach that control, activate it, and understand what changed.
Imagine asking an AI coding assistant for this:.
Build a React product carousel with previous and next arrows. Show one product at a time and wrap around at the ends.
Here’s an illustrative excerpt from the sort of implementation that can satisfy a quick mouse-driven demo:.
Sources indicate that with some CSS, this can look exactly like the arrow in the design. The click handler advances the slide. A screenshot demonstrates the right layout.
Industry observers note that but a plain div sits outside the normal Tab sequence and has no native button semantics or keyboard activation. Adding tabIndex={0} would make it reachable while leaving Enter and Space behavior to be implemented separately. The browser already provides those behaviors through a native button.
The real omission was in the requirement. “Show arrows” described the visual design. “Let someone reach and operate both controls with a keyboard” describes behavior you can test.
Here’s a small version of the same carousel. The product data is fixed for the example, and the slides change only when the user requests it.
The buttons have visible labels and work with both Enter and Space. When a slide changes, focus stays on the button you pressed, so you can press it again to keep browsing. The status message gives assistive technology a way to announce the new product and its position. Only the current product link is rendered, so Tab never lands on a link from a hidden slide.
Those are deliberate interaction choices. W3C’s carousel pattern provides guidance on using native buttons, keeping focus on the slide controls after activation, and handling automatic rotation when a design requires it. W3C Carousel Pattern.
I’d revise the original prompt like this:.
Build a manual React product carousel. Use native Previous and Next buttons. Both must work with Tab, Enter, and Space. Keep focus on the activated button after a slide change. Announce the latest product name and position through a status message. Keep only the current product link in the Tab sequence. Show what happens when the user advances past the last product.
The extra detail also gives you a review plan. For this carousel, I’d use four checks:.
Recent findings suggest that AI can help draft automated tests for the active link and wraparound behavior. I’d still run the keyboard and screen reader checks on the integrated page. A global stylesheet can erase a visible focus outline. A surrounding component can introduce an extra tab stop. The experience depends on the page the customer actually uses.
A checkout form can look complete with sample data and lose the customer’s entries when a request fails. A responsive header can match the design at two widths and overlap when a translated label is longer. A component can render correctly in isolation and shift the page when a slow image loads.
In a recent development, each example gives AI a concrete job. Ask it to preserve form values after a failed request, check the header with longer labels, or reserve space for the image. Then reproduce the condition yourself. Knowing which conditions matter is part of knowing the front end.
Sources indicate that the next time AI gives you a carousel that looks ready, start the review with your hands off the mouse. Tab to Next, press Space twice, and see where focus lands. That short test gives you evidence about how the component works for someone who relies on a keyboard.
7 Day Free Trial. Cancel Anytime.
