fix(regression-test): Fix types, syntax issues and re-enable contras tests - #2700
fix(regression-test): Fix types, syntax issues and re-enable contras tests#2700matyasf wants to merge 3 commits into
Conversation
…and react types 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Import components directly from @instructure/ui/latest instead of aliasing them and casting to any. Fix the type errors this surfaced: narrow Select highlight/select handler ids, use const assertions for View background and shadow lists, type the FormMessage array, pass tabIndex as a number, and add the missing Avatar name and DateTimeInput screen reader labels. Also update the Avatar theme overrides to the current color token names. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Visual regression reportCypress suite: ✅ Passing Visual diff:
Accessibility (axe): ✅ No violations. 📊 View full report — click a screenshot's ⚠ badge to see each violation boxed on the image, with the offending element named and contrast failures shown as color swatches. Diff images (34)avatar-canvas.png — 3217 pixels differavatar-dark.png — 4447 pixels differavatar-light.png — 3245 pixels differbillboard-canvas.png — 5095 pixels differbillboard-dark.png — 5447 pixels differbillboard-light.png — 5094 pixels differcolorpicker-canvas.png — 2831 pixels differcolorpicker-dark.png — 3750 pixels differcolorpicker-light.png — 2831 pixels differdrilldown-canvas.png — 130 pixels differdrilldown-dark.png — 200 pixels differdrilldown-light.png — 194 pixels differfiledrop-canvas.png — 4176 pixels differfiledrop-dark.png — 4176 pixels differfiledrop-light.png — 4176 pixels differform-errors-canvas.png — 101 pixels differform-errors-dark.png — 146 pixels differform-errors-light.png — 119 pixels differimg-canvas.png — 218557 pixels differimg-dark.png — 216905 pixels differimg-light.png — 218555 pixels differlink-canvas.png — 225 pixels differlink-dark.png — 4626 pixels differlink-light.png — 4611 pixels differmenu-canvas.png — 6281 pixels differmenu-dark.png — 6462 pixels differmenu-light.png — 6463 pixels differsmall-components-canvas.png — 218119 pixels differsmall-components-dark.png — 218318 pixels differsmall-components-light.png — 216290 pixels differtooltip-dark.png — 3600 pixels differview-canvas.png — 87914 pixels differview-dark.png — 96035 pixels differview-light.png — 88696 pixels differBaselines come from the |
…st rules Reworks the pages that needed axe opt-outs so they pass instead: - inherit the theme's base text color on `html`/`body`, so pages no longer rely on the browser default black - wrap the `*-inverse` and `*-on` Text samples in matching inverse/alert Views - give the `color: inherit` sample and the plain Tooltip input explicit foreground and background colors - label the View background swatches outside the swatch instead of inside Drops the now-unneeded `a11y: false` and `contrastSkipThemes` entries for the small-components, breadcrumb, form-errors, tooltip, treebrowser, and view pages. The remaining Button and Link skips are dark-theme token bugs, so their reasons now point at the exact tokens to fix. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
| 'for an inverse variant) but its label resolves to white instead of the ' + | ||
| 'dark text its own wrapper uses — 1.1:1. Fix the dark theme inverse ' + | ||
| 'button text token.' | ||
| 'Theme token, not fixable here: the `withBackground={false}` ' + |
There was a problem hiding this comment.
verified with design, that this is a real bug
| contrastSkipReason: | ||
| 'Inverse Link renders white on the light #f2f4f5 surface (1.1:1); same ' + | ||
| 'dark-theme inverse token bug as the Button page.' | ||
| 'Theme token, not fixable here: `color="link-inverse"` draws from link ' + |
There was a problem hiding this comment.
verified with design, that this is a real bug
| <div> | ||
| <Avatar | ||
| size="xx-small" | ||
| name="AI Assistant" |
There was a problem hiding this comment.
This is a required prop, with proper typing it would fail without this prop added
| <Avatar | ||
| name="Heather Wheeler" | ||
| color="accent1" | ||
| themeOverride={{ accent1TextColor: '222222' }} |
| size="medium" | ||
| heading="Well, this is awkward." | ||
| message="Think there should be something here?" | ||
| hero={(size: string) => <IconGradebookLine size={size} />} |
There was a problem hiding this comment.
I dont know why this triggered a VRT change...































Summary
@instructure/ui/latestacross the regression-test pages instead of aliasing them and casting toany.Test Plan
Check the regression test visual diffs that they are valid:
🤖 Generated with Claude Code