Skip to content

CRT-1128 Fix Safari I-beam cursor over chart captions - #7206

Draft
alantreadway wants to merge 1 commit into
latestfrom
CRT-1128/safari-caption-cursor
Draft

CRT-1128 Fix Safari I-beam cursor over chart captions#7206
alantreadway wants to merge 1 commit into
latestfrom
CRT-1128/safari-caption-cursor

Conversation

@alantreadway

Copy link
Copy Markdown
Member

https://ag-grid.atlassian.net/browse/CRT-1128

Problem

In Safari, hovering over a chart caption (title/subtitle/footnote) showed the I-beam (text) cursor instead of the default arrow, even though the caption text is not selectable.

Root cause

Captions create an accessibility text proxy (BoundedTextWidget) layered over the canvas — an absolutely-positioned <div> containing an <svg><text> that mirrors the caption text for screenreaders. Safari renders the I-beam cursor over SVG <text> content on hover, and no cursor was being set on the proxy, so it defaulted to the text cursor over the glyphs.

Fix

Force cursor: default on the proxy's <text> element in the BoundedTextWidget constructor. The <text> is the element Safari computes the I-beam for, and (unlike the wrapper <div>) it is never re-styled by ProxyInteractionService.initElement, so the cursor survives the proxy-creation flow. Accessibility is unaffected — role, content, bounds and listeners are unchanged; only the visual cursor changes.

Test plan

  • Added a unit test asserting the proxy <text> carries cursor: default.
  • yarn nx build:types ag-charts-community, yarn nx lint ag-charts-community and the new vitest test all pass.
  • Manual Safari check still required (cannot be asserted in jsdom): open the grouped-horizontal-bar gallery example in Safari, hover the caption without first touching the series-area, and confirm the arrow cursor instead of the I-beam.

Fix #CRT-1128

The accessibility text proxy for captions renders an SVG <text> element over
the canvas. Safari shows the I-beam (text) cursor over SVG text on hover, so
hovering a caption showed a text cursor despite the text being non-selectable.
Force the default cursor on the proxy's <text> element to keep the arrow cursor.
@github-actions

Copy link
Copy Markdown
Contributor

✅ Codex review complete; no issues found

View full review

CRT-1128 Fix Safari I-beam cursor over chart captions

PR: #7206
Author: alantreadway | Base: b14.0.0 ← Head: CRT-1128/safari-caption-cursor
Diff: 2 files changed, +17 -0

Summary

This PR adds a default cursor style to the SVG text element used by BoundedTextWidget to prevent Safari from showing an I-beam cursor over presentational caption text, with a focused unit test covering the style.

Findings

P0: 0 | P1: 0 | P2: 0 | P3: 0

No issues found.

Verdict

Assessment: correct
Confidence: 0.9

The change is narrowly scoped, matches the stated Safari cursor issue, and the added test verifies the exact DOM style applied to the SVG text element. I did not identify correctness, performance, security, maintainability, or developer experience issues introduced by the diff.

Required Actions: None - ready to merge

@github-actions

Copy link
Copy Markdown
Contributor

Live-test this PR in Plunker

Paste these two <script> tags into a Plunker (or any vanilla-JS host) to load the UMD bundles built from this PR:

<script src="https://ag-grid.github.io/ag-charts/pr-7206/ag-charts-community.min.js"></script>
<script src="https://ag-grid.github.io/ag-charts/pr-7206/ag-charts-enterprise.min.js"></script>

Bundles are removed automatically when the PR is closed. Updated on every push.

@alantreadway
alantreadway marked this pull request as draft June 22, 2026 12:09
@alantreadway
alantreadway changed the base branch from b14.0.0 to latest June 24, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant