Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR] Ray graph - Add screen reader support for Ray interactive graph #2036

Merged
merged 39 commits into from
Jan 16, 2025

Conversation

nishasy
Copy link
Contributor

@nishasy nishasy commented Dec 18, 2024

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.

Issue: https://khanacademy.atlassian.net/browse/LEMS-1734

Test plan:

yarn jest packages/perseus/src/widgets/interactive-graphs/graphs/ray.test.tsx

Storybook
http://localhost:6006/iframe.html?globals=&args=&id=perseuseditor-widgets-interactive-graph--interactive-graph-ray&viewMode=story

Screen.Recording.2024-12-18.at.3.57.53.PM.mov

The [SRUX doc](https://khanacademy.atlassian.net/wiki/spaces/LC/pages/3460366348/Linear) still needs a label for the grab handle, but I tried my best in the meantime.

- Add a label and describedby for the grab handle.
- Add aria-live states for the different interactive elements
  so they don't override each other.

Issue: https://khanacademy.atlassian.net/browse/LEMS-1726

Test plan:
`yarn jest packages/perseus/src/widgets/interactive-graphs/graphs/linear.test.tsx`

Storybook
- http://localhost:6006/iframe.html?id=perseuseditor-widgets-interactive-graph--interactive-graph-linear&viewMode=story
- Try all the different slopes and intercepts
- Move different elements and confirm that the updated aria-label
  is what is read out, and none of the other elements override the
  currently focused one.
@nishasy nishasy self-assigned this Dec 18, 2024
Copy link
Contributor

github-actions bot commented Dec 19, 2024

npm Snapshot: Published

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

Example:

yarn add @khanacademy/perseus@PR2036

If you are working in Khan Academy's webapp, you can run:

./dev/tools/bump_perseus_version.sh -t PR2036

Copy link
Contributor

github-actions bot commented Dec 19, 2024

Size Change: +501 B (+0.03%)

Total Size: 1.47 MB

Filename Size Change
packages/perseus/dist/es/index.js 412 kB +361 B (+0.09%)
packages/perseus/dist/es/strings.js 5.04 kB +140 B (+2.85%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 39 kB
packages/keypad-context/dist/es/index.js 760 B
packages/kmath/dist/es/index.js 83.1 kB
packages/math-input/dist/es/index.js 78 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-core/dist/es/index.js 23.1 kB
packages/perseus-editor/dist/es/index.js 689 kB
packages/perseus-linter/dist/es/index.js 22.2 kB
packages/perseus-score/dist/es/index.js 103 kB
packages/pure-markdown/dist/es/index.js 3.66 kB
packages/simple-markdown/dist/es/index.js 12.5 kB

compressed-size-action

@nishasy nishasy marked this pull request as ready for review December 19, 2024 00:03
Copy link
Member

@catandthemachines catandthemachines left a comment

Choose a reason for hiding this comment

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

Looks good to me! 😉

@@ -523,6 +548,13 @@ export const strings: {
"Point %(pointSequence)s on line %(lineNumber)s at %(x)s comma %(y)s.",
srLinearSystemGrabHandle:
"Line %(lineNumber)s from %(point1X)s comma %(point1Y)s to %(point2X)s comma %(point2Y)s.",
srRayGraph: "A ray on a coordinate plane.",
srRayPoints:
"The endpoint is at %(point1X)s comma %(point1Y)s and the terminal point is at %(point2X)s comma %(point2Y)s.",
Copy link
Contributor

Choose a reason for hiding this comment

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

This might've changed since you looked at it last, but the copy is different in the SRUX doc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for catching that!

Base automatically changed from sr-linear-system to main January 15, 2025 23:55
@nishasy
Copy link
Contributor Author

nishasy commented Jan 15, 2025

The parent pull-request (#2030) has been merged into main, but this branch (sr-ray) now has conflicts with the new base branch. These conflicts must be resolved before checks can complete on this pull-request.

@nishasy nishasy merged commit 0f8d11c into main Jan 16, 2025
8 checks passed
@nishasy nishasy deleted the sr-ray branch January 16, 2025 00:04
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.

3 participants