Skip to content

[Interactive Graph] Vector graph description polish.#3799

Open
catandthemachines wants to merge 2 commits into
mainfrom
catjohnson/vector-sr-polish
Open

[Interactive Graph] Vector graph description polish.#3799
catandthemachines wants to merge 2 commits into
mainfrom
catjohnson/vector-sr-polish

Conversation

@catandthemachines

@catandthemachines catandthemachines commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary:

Updating the Vector graph descriptions so the screen reader copy matches the Vector outline doc, and adding magnitude/direction context that is essential for all learners:

  • Renames the user-facing "tip" terminology to "head" (the graph description, the arrowhead handle label, and the srVectorTipPointsrVectorHeadPoint string key).
  • Adds the vector's magnitude (length) and direction (angle in degrees, measured counterclockwise from the positive x-axis) to the graph description.

Follows the same pattern as the exponential (#3786) and logarithm (#3798) description polish.

Issue: LEMS-4124

Test plan:

Run pnpm storybook and open Widgets → Interactive Graph → Vector. These are screen-reader strings, so verify with a screen reader or by inspecting the element aria-labels / aria-describedby text. Check:

  1. Graph description — announces the tail and head coordinates and the vector's magnitude and direction, e.g. "The tail is at 0 comma 0 and the head is at 6 comma 6. The vector has a magnitude of 8.485 and a direction of 45 degrees." Drag the body/head to confirm it updates.
  2. Head handle — reads "Vector head at X comma Y." (was "Tip point at …").
  3. Body grab handle — reads "Vector from … to …." (unchanged).
  4. Interactive elements summary"A vector on a coordinate plane. The tail is at …, and the head is at …."
  5. Live announcements — moving the head announces "Vector head at X comma Y." and dragging the whole vector announces "Vector from … to …." (kept minimal, matching the doc's notifications).

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Size Change: +256 B (+0.05%)

Total Size: 514 kB

📦 View Changed
Filename Size Change
packages/perseus/dist/es/index.js 203 kB +136 B (+0.07%)
packages/perseus/dist/es/strings.js 8.71 kB +120 B (+1.4%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 20.6 kB
packages/keypad-context/dist/es/index.js 1 kB
packages/kmath/dist/es/index.js 6.32 kB
packages/math-input/dist/es/index.js 98.5 kB
packages/math-input/dist/es/strings.js 1.61 kB
packages/perseus-core/dist/es/index.item-splitting.js 12.3 kB
packages/perseus-core/dist/es/index.js 27.3 kB
packages/perseus-editor/dist/es/index.js 105 kB
packages/perseus-linter/dist/es/index.js 9.8 kB
packages/perseus-score/dist/es/index.js 10.2 kB
packages/perseus-utils/dist/es/index.js 403 B
packages/pure-markdown/dist/es/index.js 1.39 kB
packages/simple-markdown/dist/es/index.js 6.71 kB

compressed-size-action

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (bb6a7f7) and published it to npm. You
can install it using the tag PR3799.

Example:

pnpm add @khanacademy/perseus@PR3799

If you are working in Khan Academy's frontend, you can run the below command.

./dev/tools/bump_perseus_version.ts -t PR3799

If you are working in Khan Academy's webapp, you can run the below command.

./dev/tools/bump_perseus_version.js -t PR3799

});

it("returns the tip label at the tip (index 1)", () => {
it("returns the head label at the head (index 1)", () => {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ivyolamit ivyolamit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look logical to me 👍🏼

Before After
Image Image

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.

2 participants