[Interactive Graph] Add WB Announcer to Angle Graph#3676
Open
catandthemachines wants to merge 2 commits into
Open
[Interactive Graph] Add WB Announcer to Angle Graph#3676catandthemachines wants to merge 2 commits into
catandthemachines wants to merge 2 commits into
Conversation
Contributor
|
Size Change: +151 B (+0.03%) Total Size: 505 kB 📦 View Changed
ℹ️ View Unchanged
|
Contributor
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (c5fe009) and published it to npm. You Example: pnpm add @khanacademy/perseus@PR3676If you are working in Khan Academy's frontend, you can run the below command. ./dev/tools/bump_perseus_version.ts -t PR3676If you are working in Khan Academy's webapp, you can run the below command. ./dev/tools/bump_perseus_version.js -t PR3676 |
benchristel
approved these changes
May 28, 2026
| "en", | ||
| ); | ||
|
|
||
| expect(result).toBe("Point 3, starting side at 0 comma 2."); |
Member
There was a problem hiding this comment.
A thought: it seems kind of weird that point 1 is the ending side and point 3 is the starting side. No action needed on this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Wires the Angle graph's
movePointaction into the WB Announcerpipeline.
What this PR does:
case "angle"indoMovePointnow emitsstateAnnouncement: {type: "move-angle-point", pointIndex, x, y, angleMeasure}.The reducer pre-computes the measure via
getClockwiseAngle(honoringallowReflexAngles) since it already imports the angle helpers.MoveAnglePointAnnouncementtoInteractiveGraphStateAnnouncement.getAnnouncementTexthandles"move-angle-point"by picking one of three strings based on the coord layout
[endingSide(0), vertex(1), startingSide(2)]:0→srAngleEndingSide({x, y})1→srAngleVertexWithAngleMeasure({x, y, angleMeasure})2→srAngleStartingSide({x, y})ariaLive="off"to each of the threeMovablePoints (vertex + both side points) so the WB Announcer isthe only source of move announcements for angle. Includes a
TODO(LEMS-4189)on each call site to remove the prop oncearia-liveis dropped fromuseControlPoint.movePointon angle (vertex emitsthe measured angle; side point emits
move-angle-pointwith theright
pointIndex), and threescreenreader-texttests coveringeach of the three
pointIndexbranches.Issue: LEMS-4191
Test plan:
Automated
pnpm tsc— passespnpm lint packages/perseus— passesManual (reviewer)
pnpm storybook). Turn on VoiceOver / NVDA (or use the Storybook a11y addon's live-region inspector).aria-label(unchanged).aria-liveand the WB Announcer would have fired.0) or "Point 3, starting side at X comma Y." (index2) after each move — these are the newmove-angle-pointannouncements for the sides.