Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors MageForge toolbar audit highlighting by introducing shared helpers for applying/clearing highlights, and adjusts toolbar CSS to improve highlight visibility (including a new fixed-position overlay for highlighted images).
Changes:
- Added shared
applyHighlight/clearHighlighthelpers for audit highlight behavior. - Updated multiple audits to use the shared helpers instead of duplicating highlight/badge/scroll logic.
- Enhanced audit highlight styling in
toolbar.css, including a new.mageforge-audit-img-overlayelement.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/view/frontend/web/js/toolbar/audits/highlight.js | New shared highlight/clear helpers + image overlay support |
| src/view/frontend/web/js/toolbar/audits/images-without-alt.js | Switched to shared highlight helpers |
| src/view/frontend/web/js/toolbar/audits/images-without-dimensions.js | Switched to shared highlight helpers |
| src/view/frontend/web/js/toolbar/audits/images-without-lazy-load.js | Switched to shared highlight helpers |
| src/view/frontend/web/js/toolbar/audits/inputs-without-label.js | Switched to shared highlight helpers |
| src/view/frontend/web/js/toolbar/audits/low-contrast-text.js | Switched to shared highlight helpers |
| src/view/frontend/web/css/toolbar.css | Updated highlight styles and added .mageforge-audit-img-overlay styles |
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 refactors and enhances the highlighting logic for accessibility audits in the MageForge toolbar. It centralizes the logic for applying and clearing highlight styles, improves the visual cues for different audit types, and updates the audit modules to use these shared helpers.
Refactoring and code simplification:
applyHighlightandclearHighlightinhighlight.jsto handle the application and removal of audit highlight classes, reducing code duplication across audit modules. These helpers also manage badge updates and smooth scrolling to the first highlighted element.images-without-alt.js,images-without-dimensions.js,images-without-lazy-load.js,inputs-without-label.js,low-contrast-text.js) to use the new shared highlight helpers instead of duplicating highlight logic. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]Visual and accessibility improvements:
These changes make the codebase easier to maintain and improve the clarity of audit highlights for users.