Skip to content

Preserve textual anchors during button recognition - #712

Merged
chubes4 merged 3 commits into
trunkfrom
fix/709-text-anchor-button
Jul 28, 2026
Merged

Preserve textual anchors during button recognition#712
chubes4 merged 3 commits into
trunkfrom
fix/709-text-anchor-button

Conversation

@chubes4

@chubes4 chubes4 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • require explicit role or resolved visual surface evidence before promoting anchors to core/button
  • preserve underlined textual CTAs, navigation/legal links, and unstyled action links as anchors
  • retain true stylesheet-backed CTA rows and native buttons as editor-valid button blocks
  • project authored button selectors onto the rendered inner link
  • preserve accessible labels in canonical button attributes

Verification

  • composer test
  • canonical contracts
  • 28 button classifier assertions
  • 249 parity fixtures
  • package install proof
  • PHP lint and git diff --check

Fixture 37 hero CTA and footer legal links remain plain anchors; explicit styled stream-btn and native button fixtures remain buttons.

Compatibility

Detection is intentionally conservative: unstyled anchors remain links unless they declare role=button or a resolved fill/border/radius surface. No commerce- or fixture-specific exceptions were added.

Merge order

Blocks Engine #711 may merge first; retain both branches test additions when resolving the two expected test-file conflicts.

AI assistance

OpenAI GPT-5.6 Sol via OpenCode implemented and iteratively repaired the semantic classifier through canonical/parity review. Chris Huber reviewed and remains responsible for every line.

Fixes #709.

@chubes4
chubes4 merged commit e03e3f5 into trunk Jul 28, 2026
4 checks passed
@chubes4
chubes4 deleted the fix/709-text-anchor-button branch July 28, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep textual CTA and legal anchors out of core/button conversion

1 participant