Decide whether tabs earn their complexity

A product page is a decision surface. A shopper may need dimensions, materials, delivery information and care instructions before choosing a variant or paying. Hiding those facts behind a tab set can make the page shorter, but it also makes every hidden panel dependent on controls that work and labels that invite exploration. Start by asking which facts are essential at the moment of purchase. Keep the price, variant, availability and other decisive conditions in the ordinary reading flow. Do not bury a condition solely to make the screen look tidy. For a short description and two short policies, simple headings with visible sections are often easier to read, search, print and share. A true tab set is more useful when several related, substantial panels compete for the same area and the customer has a reason to switch between them. W3C's Authoring Practices Guide defines tabs as one visible panel associated with each tab control. That model is different from ordinary links to separate pages and from an FAQ accordion where multiple answers may be expanded. Choose the interaction before styling it: if the proposed control merely scrolls to an anchor, call it an in-page link; if it swaps a panel in place, implement and test the complete tabs behavior. This prevents a visually convincing row of buttons from becoming a dead end for keyboard users.

Write labels around customer decisions

The tab names should identify what the shopper will learn, not the team that supplied the copy. “Size and fit”, “Delivery and returns” and “Materials and care” are more predictive than “Overview”, “More” and “Information”. Avoid splitting a single consequential rule across two panels; a customer should not have to infer that a return condition is partly under Delivery and partly under Terms. Keep the selected state visually clear while preserving a separate visible focus indicator for keyboard navigation. A selected tab can remain selected while focus moves to another tab in a manual activation design. If the two states look identical, users cannot tell whether they have merely inspected a control or actually changed the panel. Give the tab set a useful group label if the page has more than one set, such as “Product information” or “Warranty details”. Treat that label as orientation, not as a substitute for naming each tab. A mobile layout may wrap labels or allow a horizontal row to scroll, but it must not crop the only route to a panel. Test the actual translated English and Traditional Chinese labels at narrow widths and enlarged text; Chinese labels can occupy different space from English. The important check is whether a customer can tell which information exists, which panel is open, and how to reach another panel without guessing from colour alone.

Make movement and activation predictable

W3C's tabs pattern gives the tab list one place in the normal Tab sequence. Once focus enters the list, Left and Right Arrow move among horizontal tabs; Tab then leaves the list for the panel or next meaningful control. Space or Enter activates a focused tab when activation is manual. Home and End are optional shortcuts. This is a compact keyboard model, but it is only appropriate if it is actually implemented. Do not put every tab in the normal Tab sequence while claiming the standard tab pattern, and do not capture the Up and Down arrows in a horizontal list because those keys may be needed for page scrolling. Automatic activation is useful when every panel appears immediately as focus moves. W3C recommends that approach when panel content is already loaded and there is no noticeable delay. If a panel requires a network request, focus should not trigger repeated waiting, surprise loading or a change that makes arrow navigation sluggish. Manual activation lets the shopper move through tab names first and choose one with Space or Enter. Ensure a pointer click also sets the selected tab and the correct future keyboard entry point. A shopper may start with touch and finish with a keyboard. Test both directions of that switch, not just a fresh page load with one device.

Keep the controls and panels connected

A styled button row alone does not tell assistive technology that it is a tab set. W3C's pattern uses a tablist containing tabs and corresponding tabpanels. The selected tab exposes aria-selected true, while the others expose false. Each tab's aria-controls refers to its panel, and each panel's aria-labelledby refers back to its tab. A visible group heading can label the tablist with aria-labelledby; otherwise a concise aria-label can provide the group name. Only the active panel is displayed. The inactive panels must not leave focusable links or purchase controls available in the keyboard sequence while hidden visually. Conversely, the active panel needs a sensible route from its tab. W3C advises making the panel focusable when it has no initial focusable content, so Tab can reach the content rather than skipping over it. These attributes are a contract with the actual state of the page. Updating the visible panel while leaving aria-selected on the old tab gives contradictory information. Replacing panel HTML asynchronously can also erase a customer's focus or current reading position. Build one state change that updates visibility, selection, focusability and the active content together. Then inspect the accessibility tree and listen with a screen reader; reading source code alone cannot prove the experience works.

Work through a product-page example

Imagine a Hong Kong retailer selling a desk lamp. The first panel explains dimensions and compatible bulbs, the second gives delivery choices, and the third describes returns. These are illustrative contents, not a claim about a particular merchant. The merchant should first decide whether the return deadline is material enough to remain visible near the purchase control; if it is, a short summary and link can stay outside the tabs even when full detail lives in a panel. A reviewer opens the page at desktop width, moves into the tab list with Tab, reaches Delivery with Right Arrow, activates it with Enter, and then tabs into the panel. The reviewer checks that the visual selection, announced selection and visible content all say Delivery. They then use a mouse to choose Returns and use the keyboard again; focus entry should now make sense. Next, repeat at a narrow phone width, with enlarged text and in both languages. If labels wrap, the hit areas and order must remain clear. Finally, copy a deep link or refresh the page if the site claims tab-specific links: either restore the intended panel or avoid promising a link to hidden content. A failure in any of these checks suggests a repair to the widget or a return to visible headed sections, not another layer of decorative styling.

Release only after a real journey test

A useful acceptance test starts with questions, not a screenshot. Can a customer discover all three subjects without opening every panel? Can someone who uses only the keyboard reach each one, return to the purchase control and keep their place? Does the screen reader announce the tab's name, selected state and associated panel? Does changing a tab reveal the same facts in English and Traditional Chinese, with no missing conditions? Are links, tables and buttons inside the active panel usable at phone width? Does browser find or print expose a critical condition, or does the page need a visible summary outside the widget? Different browsers and assistive technologies may handle APG examples differently; W3C explicitly warns that an example is illustrative and should be tested before production use. Record the device, browser, input method, language and specific failure, then repair the state and retest the same journey. The practical decision is to use tabs only when they make substantial related information easier to compare and when the team can maintain the entire interaction. Otherwise, plain sections serve customers well. The page's goal is an informed purchase, not a particular interface pattern.

Before you proceed

  • Keep decisive purchase conditions visible before payment.
  • Test arrows, Tab, Enter, pointer and input switching in both languages.

Sources & further reading