-
Notifications
You must be signed in to change notification settings - Fork 350
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
Conversation
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.
…inear System interactive graph
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (e5b8cd1) and published it to npm. You 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 |
Size Change: +501 B (+0.03%) Total Size: 1.47 MB
ℹ️ View Unchanged
|
There was a problem hiding this 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! 😉
packages/perseus/src/strings.ts
Outdated
@@ -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.", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
The parent pull-request (#2030) has been merged into |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @khanacademy/perseus@51.0.0 ### Major Changes - [#2101](#2101) [`9cabe689a`](9cabe68) Thanks [@handeyeco](https://github.com/handeyeco)! - Move scorers and validators to `perseus-score` ### Minor Changes - [#2127](#2127) [`6f2813cfc`](6f2813c) Thanks [@benchristel](https://github.com/benchristel)! - Avoid adding undefined values to objects parsed from Perseus JSON when properties are missing. ### Patch Changes - [#2130](#2130) [`165305e11`](165305e) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Change interactive-graph visual regression stories to Storybook's CSF v3 - [#2077](#2077) [`faccc2d59`](faccc2d) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Enable the exhaustive test tool for parsePerseusItem to test articles. - [#2030](#2030) [`d96821e08`](d96821e) Thanks [@nishasy](https://github.com/nishasy)! - [SR] Linear System - add screen reader support for Linear System interactive graph - [#2036](#2036) [`0f8d11c0b`](0f8d11c) Thanks [@nishasy](https://github.com/nishasy)! - [SR] Ray graph - Add screen reader support for Ray interactive graph - [#2109](#2109) [`41ffd4a71`](41ffd4a) Thanks [@dependabot](https://github.com/apps/dependabot)! - Updating our wonder-blocks packages with the latest versions. - Updated dependencies \[[`9cabe689a`](9cabe68), [`41ffd4a71`](41ffd4a)]: - @khanacademy/kmath@0.3.0 - @khanacademy/perseus-core@3.2.0 - @khanacademy/perseus-score@1.1.0 - @khanacademy/math-input@22.2.1 - @khanacademy/kas@0.4.11 - @khanacademy/keypad-context@1.0.14 - @khanacademy/perseus-linter@1.2.13 - @khanacademy/pure-markdown@0.3.22 - @khanacademy/simple-markdown@0.13.15 ## @khanacademy/kmath@0.3.0 ### Minor Changes - [#2101](#2101) [`9cabe689a`](9cabe68) Thanks [@handeyeco](https://github.com/handeyeco)! - Move scorers and validators to `perseus-score` ### Patch Changes - Updated dependencies \[[`9cabe689a`](9cabe68)]: - @khanacademy/perseus-core@3.2.0 ## @khanacademy/perseus-core@3.2.0 ### Minor Changes - [#2101](#2101) [`9cabe689a`](9cabe68) Thanks [@handeyeco](https://github.com/handeyeco)! - Move scorers and validators to `perseus-score` ## @khanacademy/perseus-score@1.1.0 ### Minor Changes - [#2101](#2101) [`9cabe689a`](9cabe68) Thanks [@handeyeco](https://github.com/handeyeco)! - Move scorers and validators to `perseus-score` ### Patch Changes - Updated dependencies \[[`9cabe689a`](9cabe68)]: - @khanacademy/kmath@0.3.0 - @khanacademy/perseus-core@3.2.0 - @khanacademy/kas@0.4.11 ## @khanacademy/kas@0.4.11 ### Patch Changes - Updated dependencies \[[`9cabe689a`](9cabe68)]: - @khanacademy/perseus-core@3.2.0 ## @khanacademy/keypad-context@1.0.14 ### Patch Changes - Updated dependencies \[[`9cabe689a`](9cabe68)]: - @khanacademy/perseus-core@3.2.0 ## @khanacademy/math-input@22.2.1 ### Patch Changes - [#2101](#2101) [`9cabe689a`](9cabe68) Thanks [@handeyeco](https://github.com/handeyeco)! - Move scorers and validators to `perseus-score` - [#2109](#2109) [`41ffd4a71`](41ffd4a) Thanks [@dependabot](https://github.com/apps/dependabot)! - Updating our wonder-blocks packages with the latest versions. - Updated dependencies \[[`9cabe689a`](9cabe68)]: - @khanacademy/perseus-core@3.2.0 - @khanacademy/keypad-context@1.0.14 ## @khanacademy/perseus-editor@17.3.1 ### Patch Changes - [#2101](#2101) [`9cabe689a`](9cabe68) Thanks [@handeyeco](https://github.com/handeyeco)! - Move scorers and validators to `perseus-score` - [#2126](#2126) [`518b005f2`](518b005) Thanks [@benchristel](https://github.com/benchristel)! - Fix a React warning about non-unique component keys in the exercise editor. - [#2109](#2109) [`41ffd4a71`](41ffd4a) Thanks [@dependabot](https://github.com/apps/dependabot)! - Updating our wonder-blocks packages with the latest versions. - Updated dependencies \[[`165305e11`](165305e), [`6f2813cfc`](6f2813c), [`faccc2d59`](faccc2d), [`9cabe689a`](9cabe68), [`d96821e08`](d96821e), [`0f8d11c0b`](0f8d11c), [`41ffd4a71`](41ffd4a)]: - @khanacademy/perseus@51.0.0 - @khanacademy/kmath@0.3.0 - @khanacademy/perseus-core@3.2.0 - @khanacademy/perseus-score@1.1.0 - @khanacademy/math-input@22.2.1 - @khanacademy/kas@0.4.11 - @khanacademy/keypad-context@1.0.14 - @khanacademy/pure-markdown@0.3.22 ## @khanacademy/perseus-linter@1.2.13 ### Patch Changes - Updated dependencies \[[`9cabe689a`](9cabe68)]: - @khanacademy/perseus-core@3.2.0 ## @khanacademy/pure-markdown@0.3.22 ### Patch Changes - Updated dependencies \[[`9cabe689a`](9cabe68)]: - @khanacademy/perseus-core@3.2.0 - @khanacademy/simple-markdown@0.13.15 ## @khanacademy/simple-markdown@0.13.15 ### Patch Changes - Updated dependencies \[[`9cabe689a`](9cabe68)]: - @khanacademy/perseus-core@3.2.0 ## @khanacademy/perseus-dev-ui@5.1.1 ### Patch Changes - [#2101](#2101) [`9cabe689a`](9cabe68) Thanks [@handeyeco](https://github.com/handeyeco)! - Move scorers and validators to `perseus-score` - [#2109](#2109) [`41ffd4a71`](41ffd4a) Thanks [@dependabot](https://github.com/apps/dependabot)! - Updating our wonder-blocks packages with the latest versions. - Updated dependencies \[[`9cabe689a`](9cabe68), [`41ffd4a71`](41ffd4a)]: - @khanacademy/kmath@0.3.0 - @khanacademy/perseus-core@3.2.0 - @khanacademy/math-input@22.2.1 - @khanacademy/kas@0.4.11 - @khanacademy/perseus-linter@1.2.13 - @khanacademy/pure-markdown@0.3.22 - @khanacademy/simple-markdown@0.13.15 Author: khan-actions-bot Reviewers: jeremywiebe Required Reviewers: Approved By: jeremywiebe Checks: ⏭️ Publish npm snapshot, ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x) Pull Request URL: #2117
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