You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SR] Linear System - add screen reader support for Linear System interactive graph (#2030)
## Summary:
Add the aria label and descriptions for the full graph and the
interactive elements in the Linear System graph, based on the
[SRUX doc](https://khanacademy.atlassian.net/wiki/spaces/LC/pages/3460366359/Linear+Systems).
Issue: https://khanacademy.atlassian.net/browse/LEMS-1727
## Test plan:
`yarn jest packages/perseus/src/widgets/interactive-graphs/graphs/linear-system.test.tsx`
Storybook
- http://localhost:6006/iframe.html?globals=&args=&id=perseuseditor-widgets-interactive-graph--interactive-graph-linear-system&viewMode=story
View Storybook publish in the checks below to try it yourself.
https://github.com/user-attachments/assets/007a3418-5dcb-470f-a3fd-45479cc3c4d2
Author: nishasy
Reviewers: catandthemachines, benchristel, nishasy, anakaren-rojas
Required Reviewers:
Approved By: anakaren-rojas, catandthemachines
Checks: ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x)
Pull Request URL: #2030
Copy file name to clipboardexpand all lines: packages/perseus/src/strings.ts
+35
Original file line number
Diff line number
Diff line change
@@ -260,6 +260,31 @@ export type PerseusStrings = {
260
260
endingSideX: string;
261
261
endingSideY: string;
262
262
})=>string;
263
+
srLinearSystemGraph: string;
264
+
srLinearSystemPoints: ({
265
+
lineNumber,
266
+
point1X,
267
+
point1Y,
268
+
point2X,
269
+
point2Y,
270
+
}: {
271
+
lineNumber: number;
272
+
point1X: string;
273
+
point1Y: string;
274
+
point2X: string;
275
+
point2Y: string;
276
+
})=>string;
277
+
srLinearSystemPoint({
278
+
lineNumber,
279
+
pointSequence,
280
+
x,
281
+
y,
282
+
}: {
283
+
lineNumber: number;
284
+
pointSequence: number;
285
+
x: string;
286
+
y: string;
287
+
}): string;
263
288
// The above strings are used for interactive graph SR descriptions.
264
289
};
265
290
@@ -480,6 +505,11 @@ export const strings: {
480
505
srAngleGraphAriaLabel: "An angle on a coordinate plane.",
481
506
srAngleGraphAriaDescription:
482
507
"The angle measure is %(angleMeasure)s degrees with a vertex at %(vertexX)s comma %(vertexY)s, a point on the starting side at %(startingSideX)s comma %(startingSideY)s and a point on the ending side at %(endingSideX)s comma %(endingSideY)s",
508
+
srLinearSystemGraph: "Two lines on a coordinate plane.",
509
+
srLinearSystemPoints:
510
+
"Line %(lineNumber)s has two points, point 1 at %(point1X)s comma %(point1Y)s and point 2 at %(point2X)s comma %(point2Y)s.",
511
+
srLinearSystemPoint:
512
+
"Point %(pointSequence)s on line %(lineNumber)s at %(x)s comma %(y)s.",
483
513
// The above strings are used for interactive graph SR descriptions.
`The angle measure is ${angleMeasure} degrees with a vertex at ${vertexX} comma ${vertexY}, a point on the starting side at ${startingSideX} comma ${startingSideY} and a point on the ending side at ${endingSideX} comma ${endingSideY}.`,
730
+
srLinearSystemGraph: "Two lines on a coordinate plane.",
0 commit comments