bump
This commit is contained in:
73
CHANGELOG.md
Normal file
73
CHANGELOG.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# Cremote Changelog
|
||||
|
||||
## Version 2.2.0-contrast-detection-fix (2025-12-09)
|
||||
|
||||
### Major Improvements: Contrast Detection
|
||||
|
||||
This release fixes three critical issues in the WCAG contrast checking functionality that were causing false positives and incorrect reporting.
|
||||
|
||||
#### Fixed Issues
|
||||
|
||||
1. **Gradient Background Detection** ✅
|
||||
- **Problem:** Text on gradient backgrounds was incorrectly reported as white-on-white (1:1 ratio)
|
||||
- **Fix:** Enhanced gradient detection to walk up the DOM tree and find gradients on parent elements
|
||||
- **Impact:** Eliminates false positives for text on gradient backgrounds (e.g., hero sections with gradient overlays)
|
||||
|
||||
2. **Solid Background Priority** ✅
|
||||
- **Problem:** Gradient backgrounds were incorrectly applied to elements with solid backgrounds
|
||||
- **Fix:** Modified gradient detection to stop when encountering solid backgrounds - only applies gradients when no solid background exists between element and gradient
|
||||
- **Impact:** Ensures accurate background color detection for elements with solid backgrounds
|
||||
|
||||
3. **Child Element Text Color Detection** ✅
|
||||
- **Problem:** Tool used parent element's color (e.g., `<a>`) instead of child element's color (e.g., `<span>`)
|
||||
- **Fix:** Added logic to check visible child elements and use their text color when present
|
||||
- **Impact:** Accurate text color detection for complex DOM structures with styled child elements
|
||||
|
||||
### Technical Details
|
||||
|
||||
**Modified Files:**
|
||||
- `daemon/daemon.go` - Lines 9152-9220: Enhanced `analyzeGradientContrast()` function
|
||||
- `daemon/daemon.go` - Lines 9305-9340: Updated background detection logic
|
||||
- `daemon/daemon.go` - Lines 9257-9322: Enhanced text color detection
|
||||
|
||||
**Version Updates:**
|
||||
- Daemon: `2.2.0-contrast-detection-fix`
|
||||
- MCP Server: `2.2.0-contrast-detection-fix`
|
||||
- CLI: `2.2.0`
|
||||
|
||||
### Testing
|
||||
|
||||
Test cases that now work correctly:
|
||||
- ✅ White text on gradient backgrounds (e.g., `linear-gradient(rgb(12, 90, 201) 0%, rgb(0, 0, 0) 100%)`)
|
||||
- ✅ Text on solid backgrounds with gradient ancestors
|
||||
- ✅ Links with styled child spans (`<a><span style="color: ...">text</span></a>`)
|
||||
|
||||
### Upgrade Notes
|
||||
|
||||
After deploying this version:
|
||||
1. Restart the cremote daemon service
|
||||
2. Restart the MCP server or Augment extension
|
||||
3. Re-run contrast audits on pages that previously showed false positives
|
||||
|
||||
### Documentation
|
||||
|
||||
See `GRADIENT_CONTRAST_FIX.md` for detailed technical documentation of the fixes.
|
||||
|
||||
---
|
||||
|
||||
## Version 2.1.0-visibility-fix
|
||||
|
||||
### Improvements
|
||||
- Enhanced visibility detection for contrast checking
|
||||
- Improved handling of hidden elements
|
||||
|
||||
---
|
||||
|
||||
## Version 2.0.1
|
||||
|
||||
### Initial Release
|
||||
- Core cremote functionality
|
||||
- Browser automation via Chrome DevTools Protocol
|
||||
- Accessibility testing tools
|
||||
- MCP server integration
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"github.com/go-rod/rod/lib/proto"
|
||||
)
|
||||
|
||||
const Version = "2.1.0-visibility-fix"
|
||||
const Version = "2.2.0-contrast-detection-fix"
|
||||
|
||||
// Daemon is the main server that manages browser connections
|
||||
type Daemon struct {
|
||||
|
||||
2
main.go
2
main.go
@@ -9,7 +9,7 @@ import (
|
||||
"git.teamworkapps.com/shortcut/cremote/client"
|
||||
)
|
||||
|
||||
const Version = "2.0.1"
|
||||
const Version = "2.2.0"
|
||||
|
||||
var (
|
||||
// Global flags
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
)
|
||||
|
||||
const Version = "2.1.0-visibility-fix"
|
||||
const Version = "2.2.0-contrast-detection-fix"
|
||||
|
||||
// CremoteServer wraps the cremote client for MCP
|
||||
type CremoteServer struct {
|
||||
|
||||
Reference in New Issue
Block a user