Tabindex
Moderate effortFound on 4% of audited stores.
Remove all positive tabindex values (tabindex="1" or higher) from your store's HTML elements, replacing them with tabindex="0" or relying on natural document order to control keyboard focus.
What it is
The `tabindex` attribute tells a browser how an element should behave when a user presses the Tab key to navigate a page by keyboard. A value of `0` means "include this element in the normal tab order," while a value of `-1` means "exclude it from tab order but allow programmatic focus." A positive value — like `tabindex="1"`, `tabindex="2"`, etc. — forces that element to be focused *before* everything else on the page, regardless of where it sits in the HTML. This almost always creates a confusing, broken keyboard experience because the visual order and the focus order no longer match.
Why it matters
Keyboard navigation is essential for people who cannot use a mouse — including users with motor disabilities, screen-reader users, and power users who rely on the Tab key. When positive tabindex values are present, focus jumps unpredictably around the page, making it nearly impossible for these shoppers to browse products, fill in forms, or complete a checkout. This violates WCAG 2.1 Success Criterion 2.4.3 (Focus Order) at Level AA — the standard that most accessibility laws (ADA, European Accessibility Act, UK Equality Act) reference. Failing it exposes your business to legal complaints and litigation, and it directly harms conversion rates by locking out an estimated 15–20% of online shoppers who have some form of disability.
How to fix it
- Audit your pages using your browser's DevTools: open the Elements/Inspector panel and search the HTML for 'tabindex' to find every instance. Note any value greater than 0.
- For each element with a positive tabindex, decide whether it truly needs to be in the tab order. If it is a naturally focusable element (link, button, input, select, textarea), simply remove the tabindex attribute entirely — the browser will handle it correctly.
- If the element is not natively focusable (e.g. a <div> or <span> acting as an interactive control) and must be reachable by keyboard, change its tabindex to '0' so it joins the normal document-order tab sequence.
- Reorder the elements in your HTML source to match the visual/logical reading order, so that the natural tab sequence makes sense without needing any positive tabindex values.
- Use tabindex='-1' only when you need to move focus programmatically via JavaScript (e.g. opening a modal) but do not want the element in the standard tab flow.
- Verify the fix by tabbing through the entire page with only a keyboard: focus should move top-to-bottom, left-to-right in a logical order that matches what a sighted user would read, with no unexpected jumps.
<![CDATA[<!-- ❌ WRONG: positive tabindex breaks focus order -->
<button tabindex="3">Add to Cart</button>
<a href="/sale" tabindex="1">View Sale</a>
<input type="email" tabindex="2" placeholder="Your email">
<!-- ✅ CORRECT: remove attribute or use 0; rely on document order -->
<a href="/sale">View Sale</a>
<input type="email" placeholder="Your email">
<button>Add to Cart</button>
<!-- ✅ CORRECT: non-native interactive element added to normal tab flow -->
<div role="button" tabindex="0" onclick="openMenu()">Menu</div>
<!-- ✅ CORRECT: focus target for JS only, not in tab flow -->
<div id="modal-heading" tabindex="-1">Special Offer</div>
]]>Fix it on your platform
Pick your platform for the exact steps.
How to fix tabindex on Shopify
- Go to Online Store → Themes → click 'Customize' on your active theme.
- For theme-level HTML/Liquid changes: from the theme editor click the three-dot menu → 'Edit code'. Search all .liquid files (use Ctrl+F in each file, or the built-in search) for 'tabindex' to locate every occurrence.
- In each file, remove positive tabindex attributes or change them to tabindex='0'. Save each file.
- If a third-party app (e.g. a popup, reviews widget, or page builder like Shogun/PageFly) is injecting elements with positive tabindex values, check that app's settings for custom HTML blocks and edit the markup there, or contact the app developer.
- Verify by previewing your theme and tabbing through the storefront in a browser without clicking the mouse.
How to fix tabindex on WooCommerce
- Log in to WordPress Admin → Appearance → Theme File Editor (or use a child theme and edit files via FTP/SFTP).
- Search all theme template files (header.php, footer.php, page.php, woocommerce/ overrides) for 'tabindex' using your code editor's global search.
- Remove or correct any positive tabindex values in those files.
- Also check any active page-builder plugins (Elementor, Divi, etc.): edit the affected widget/module and look in its 'Advanced' or 'Custom Attributes' section for a tabindex setting — remove or set to 0.
- For WooCommerce-specific templates (e.g. checkout form), copy the template to your child theme under woocommerce/ and edit there so updates do not overwrite your changes.
- Install the 'Accessibility Checker' plugin (e.g. WP Accessibility or Equalize Digital Accessibility Checker) to re-scan after your changes.
How to fix tabindex on BigCommerce
- Go to Storefront → My Themes → click 'Advanced' → 'Edit Theme Files' on your active theme (or download the theme for local editing).
- Use the built-in editor's search (or a local code editor) to search all .html and .html.twig template files for 'tabindex'.
- Remove or replace any positive tabindex values, then save/upload the files.
- If you use Page Builder widgets, go to the affected page in the Page Builder, select the widget containing the element, and edit its HTML in the 'Custom HTML' block.
- Preview the store and tab through the page to confirm logical focus order.
How to fix tabindex on Wix
- Open the Wix Editor for your site.
- Wix standard components do not expose a tabindex setting in the visual editor — if positive tabindex values exist, they are almost certainly inside a custom HTML embed: click on the affected element, select 'HTML iFrame' or 'Embed Code' widget, and click 'Enter Code' to edit the raw HTML.
- Inside that HTML embed, find and remove or correct the positive tabindex attribute.
- For Wix Velo (custom code): open the Velo panel → site code or the relevant page code, search for 'tabindex', and remove positive values.
- Publish the site and verify tab order by keyboard-tabbing through the live page.
How to fix tabindex on Wix Studio
- Open Wix Studio editor and navigate to the page or component with the issue.
- If the element is inside a Custom Element or HTML Component, click it → 'Edit Code' and remove positive tabindex attributes from the markup.
- For Velo/Studio code panels, search your page and masterpage code for 'tabindex' and remove any value above 0.
- If using a Studio block, select the block → 'Edit Block' → inspect the inner HTML widgets for embedded tabindex values.
- Publish and verify with keyboard-only navigation.
How to fix tabindex on Squarespace
- Log in → Pages → edit the affected page.
- Squarespace's built-in blocks do not let you set tabindex through the visual UI. If a positive tabindex is present, it is inside a Code Block or Markdown Block: click the block to edit it, find the tabindex attribute in the raw HTML, and remove or correct it.
- For site-wide code injections: go to Settings → Advanced → Code Injection. Search the header/footer injection fields for 'tabindex' and correct any positive values there.
- For template-level customization (Squarespace 7.0 only): Settings → Advanced → Code Injection, or the Developer Platform for custom templates — edit the relevant .region or .block file.
- Preview the page and tab through it to confirm correct focus order.
How to fix tabindex on Webflow
- Open the Webflow Designer for your project.
- Select the element that has the positive tabindex. In the right-hand Settings panel (gear icon), scroll to the 'Accessibility' section — Webflow exposes a 'Tab Index' field here. Clear the positive value or set it to 0.
- For elements where the tabindex was added via custom attributes: in the Settings panel → 'Custom Attributes' section, find the tabindex attribute row and update its value.
- If the element is inside an Embed widget (</> icon), click 'Edit' on the embed and correct the raw HTML.
- Publish the project and verify by tabbing through the published page.
How to fix tabindex on Adobe Commerce (Magento)
- Identify the .phtml template or .html Knockout/UI-component template responsible for the element. Use your IDE's global project search for 'tabindex' across app/design/ and vendor/ (prefer overriding in app/design/frontend/<Vendor>/<theme>/).
- Create a theme override in your custom theme directory mirroring the original file path, then remove or correct the positive tabindex value in the override file.
- For JavaScript-rendered components (e.g. minicart, checkout), search the corresponding .js or Knockout .html binding template for tabindex and apply the same correction.
- Run `bin/magento cache:flush` and `bin/magento setup:static-content:deploy` to apply the changes.
- Use a keyboard to tab through the affected storefront page (especially checkout) to confirm logical, sequential focus order.
How to fix tabindex on Magento Open Source
- Follow the same template-override approach as Adobe Commerce: locate the .phtml or UI-component .html file, create an override in app/design/frontend/<Vendor>/<theme>/, and correct all positive tabindex values.
- Flush the Magento cache and redeploy static content after saving changes.
- Verify with keyboard-only navigation through the storefront.
How to fix tabindex on PrestaShop
- Connect via FTP/SFTP or use the Admin File Manager. Navigate to themes/<your-theme>/templates/ and search all .tpl (Smarty) files for 'tabindex'.
- Edit the offending .tpl file and remove or set the tabindex to 0. Always work in a child theme or custom theme to avoid losing changes on updates.
- Also check any installed modules (modules/<module-name>/views/templates/) for positive tabindex values and override them via the theme's module template override folder.
- Clear the PrestaShop cache: Admin → Advanced Parameters → Performance → 'Clear cache'. Verify with keyboard navigation.
Does your site have this issue?
Run a free SEOLZ audit to find tabindex — and every other issue — across your whole site in minutes.
Scan my site freeFrequently asked questions
What is Tabindex?
The `tabindex` attribute tells a browser how an element should behave when a user presses the Tab key to navigate a page by keyboard. A value of `0` means "include this element in the normal tab order," while a value of `-1` means "exclude it from tab order but allow programmatic focus." A positive value — like `tabindex="1"`, `tabindex="2"`, etc. — forces that element to be focused *before* everything else on the page, regardless of where it sits in the HTML. This almost always creates a confusing, broken keyboard experience because the visual order and the focus order no longer match.
Why does tabindex matter?
Keyboard navigation is essential for people who cannot use a mouse — including users with motor disabilities, screen-reader users, and power users who rely on the Tab key. When positive tabindex values are present, focus jumps unpredictably around the page, making it nearly impossible for these shoppers to browse products, fill in forms, or complete a checkout. This violates WCAG 2.1 Success Criterion 2.4.3 (Focus Order) at Level AA — the standard that most accessibility laws (ADA, European Accessibility Act, UK Equality Act) reference. Failing it exposes your business to legal complaints and litigation, and it directly harms conversion rates by locking out an estimated 15–20% of online shoppers who have some form of disability.
How do I fix tabindex?
Remove all positive tabindex values (tabindex="1" or higher) from your store's HTML elements, replacing them with tabindex="0" or relying on natural document order to control keyboard focus.
Authoritative references
- How to fix this specific rule — Deque/axe (rule reference)
- WCAG 2 overview — W3C WAI
- ARIA basics — MDN