Skip to content

Heatmap verifier crashes on SVG pixel-unit coordinates that render identically #300

Description

@rudycelekli

Problem

Adding an explicit SVG px unit to a heatmap coordinate causes an uncaught ValueError. On current main, change only the shipped focal rect's x="520" to x="520px" and run python3 scripts/verify-heatmap.py file.html: it crashes in parse_cells float(x). Native Chromium resolves both to x520 and reports identical SVG bounds{x520,y124,width116,height56}.

The Heatmap reference explicitly excludes cell geometry from the quantitative contract and declares no pixel-unit ban. These coordinates are nevertheless read for focal-text contrast, so they should be interpreted consistently or reported as unreadable with a named finding.

Proposed scope

Normalize finite unitless and pixel length values in the existing cell/text contrast measurement path. Return a named diagnostic for unsupported/malformed lengths instead of a traceback; do not claim support for arbitrary relative units or redesign geometry verification. Test public CLI equivalent pixel/unitless coordinates and unsupported/malformed lengths, retaining existing contrast and grid/ramp controls.

Codex is assisting on behalf of @rudycelekli.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions