Skip to content

feat: add additional audits for accessibility and usability checks#178

Merged
dermatz merged 8 commits intomainfrom
feat/add-additional-checks
Apr 24, 2026
Merged

feat: add additional audits for accessibility and usability checks#178
dermatz merged 8 commits intomainfrom
feat/add-additional-checks

Conversation

@dermatz
Copy link
Copy Markdown
Member

@dermatz dermatz commented Apr 24, 2026

This pull request significantly expands the MageForge Toolbar's accessibility and HTML quality audit capabilities, adds new audit definitions, and improves the UI/UX for the audit menu. The most important changes include the addition of several new audits (such as checks for duplicate IDs, multiple H1s, empty interactive elements, and more), grouping audits by theme, and enhancing the audit menu's interactivity and styling for better usability.

New accessibility and HTML quality audits:

  • Added new audit definitions for: duplicate IDs, multiple H1 headings, empty links & buttons, buttons without a type attribute, small touch targets, and unsafe target="_blank" links. Each audit highlights problematic elements and provides relevant context for accessibility and HTML quality. [1] [2] [3] [4] [5]

  • Registered new audits in the toolbar and grouped them under "WCAG Checks" and "HTML Quality" for improved organization and discoverability. [1] [2]

Audit menu UI/UX improvements:

  • Updated toolbar.css to improve the audit menu's scrollability, sticky headers, padding, and styling for active descriptions, making it more user-friendly and visually clear. [1] [2] [3] [4]

  • Enhanced the audit menu description elements to allow selection/copying, styled them when active, and prevented click propagation for interactive descriptions. [1] [2]

Audit interactivity enhancements:

  • Added setAuditDescription method to dynamically update the description of audit menu items, enabling audits to surface specific details (e.g., listing duplicate IDs).

These changes collectively make the audit system more robust, user-friendly, and effective at surfacing accessibility and quality issues in the UI.

Copilot AI review requested due to automatic review settings April 24, 2026 17:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the MageForge Toolbar’s in-browser audit system by adding new accessibility/HTML-quality audits, organizing audits into additional groups, and improving the audit menu UX so audits can surface richer per-audit details.

Changes:

  • Added multiple new audit definitions (duplicate IDs, multiple H1s, empty interactive elements, buttons without type, small touch targets, unsafe target="_blank").
  • Introduced an “HTML Quality” audit group and registered the new audits under WCAG / HTML Quality groupings.
  • Enhanced the menu UI/UX (scrollable menu, sticky header, selectable descriptions) and added setAuditDescription() for dynamic per-audit description updates.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/view/frontend/web/js/toolbar/ui.js Adjusts menu item description interactions (click/selection behavior).
src/view/frontend/web/js/toolbar/audits.js Adds setAuditDescription() to update audit menu item descriptions dynamically.
src/view/frontend/web/js/toolbar/audits/index.js Registers new audits and adds an “HTML Quality” audit group.
src/view/frontend/web/js/toolbar/audits/unsafe-blank-target.js New audit for target="_blank" links missing safe rel values.
src/view/frontend/web/js/toolbar/audits/small-touch-targets.js New audit for interactive elements under 44×44px.
src/view/frontend/web/js/toolbar/audits/multiple-h1.js New audit to flag pages with multiple <h1> headings.
src/view/frontend/web/js/toolbar/audits/empty-interactive.js New audit to flag links/buttons without an accessible name.
src/view/frontend/web/js/toolbar/audits/duplicate-ids.js New audit for duplicate id attributes and dynamic description output.
src/view/frontend/web/js/toolbar/audits/buttons-without-type.js New audit to flag <button> elements missing an explicit type.
src/view/frontend/web/css/toolbar.css Menu layout/scrolling improvements + styling for “active” descriptions.

Comment thread src/view/frontend/web/js/toolbar/ui.js
Comment thread src/view/frontend/web/js/toolbar/audits/empty-interactive.js Outdated
Comment thread src/view/frontend/web/js/toolbar/audits/small-touch-targets.js Outdated
Comment thread src/view/frontend/web/js/toolbar/audits/duplicate-ids.js Outdated
Copilot AI review requested due to automatic review settings April 24, 2026 18:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread src/view/frontend/web/js/toolbar/audits/unsafe-blank-target.js Outdated
Comment thread src/view/frontend/web/js/toolbar/audits/small-touch-targets.js
Copilot AI review requested due to automatic review settings April 24, 2026 18:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Comment thread src/view/frontend/web/js/toolbar/audits/duplicate-ids.js
Comment thread src/view/frontend/web/js/toolbar/audits/buttons-without-type.js Outdated
Comment thread src/view/frontend/web/js/toolbar/audits/buttons-without-type.js Outdated
Comment thread src/view/frontend/web/js/toolbar/audits/empty-interactive.js Outdated
@dermatz dermatz merged commit 2dfea0d into main Apr 24, 2026
13 checks passed
@dermatz dermatz deleted the feat/add-additional-checks branch April 24, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants