feat: add additional audits for accessibility and usability checks#178
Merged
feat: add additional audits for accessibility and usability checks#178
Conversation
Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
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, unsafetarget="_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. |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.cssto 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:
setAuditDescriptionmethod 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.