Skip to content

fix(toolbar): exclude elements with negative tabindex from tab order audit - #294

Merged
dermatz merged 1 commit into
mainfrom
fix/tab-order-negative-tabindex
Nov 13, 2026
Merged

dermatz merged 1 commit into
mainfrom
fix/tab-order-negative-tabindex

Conversation

@dermatz

@dermatz dermatz commented Nov 13, 2026

Copy link
Copy Markdown
Member

The tab order audit selected [tabindex]:not([tabindex="-1"]) plus a[href]/button etc., so elements with a negative tabindex (e.g. -2, or -1 on links) were still numbered although they cannot be reached via Tab.

This filters out every candidate with a tabindex below zero before rendering the overlay.

…audit

Elements with tabindex below zero (e.g. -2, or -1 on links) are not
reachable via the Tab key but were still listed in the tab order overlay.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 07:44
@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

The tab-order audit now removes candidates with a negative tabindex before drawing the overlay.

  • The tab-order audit skips every element with a negative tabindex.

Reviews (1) · Last reviewed commit: "fix(toolbar): exclude elements with nega..." · Reviewed by Greptile

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the change excluding negative-tabindex elements from the tab-order overlay.

No open issues 🎉

What changed in this PR

Corrects the MageForge toolbar’s tab order audit so its numbered overlay excludes elements with any negative tabindex, including otherwise focusable links and buttons.

Changes:

  • Filters candidates using getTabIndex(el) >= 0 before checking visibility and rendering the overlay.
File Description
src/​view/​frontend/​web/​js/​toolbar/​audits/​tab-order.js Excludes negative-tabindex elements from the tab order audit.

Review effort: Balanced

@dermatz
dermatz merged commit 869cb4c into main Nov 13, 2026
23 checks passed
@dermatz
dermatz deleted the fix/tab-order-negative-tabindex branch November 13, 2026 07:56
@github-actions github-actions Bot mentioned this pull request Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants