-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Locked Figure Aria] Use spoken math in Locked Line settings autogen …
…labels (#1854) ## Summary: When auto-generating the aria labels for locked figures, we want it to use words as if they were spoken rather than math expressions that might be read incorrectly by the screen reader. - Use the `generateSpokenMathDetails` utility within LockedLineSettings, following the pattern used in LockedPointSettings for this. - Update the locked line autogen function to include the labels on the locked points that define the locked line. Issue: https://khanacademy.atlassian.net/browse/LEMS-2548 ## Test plan: - `yarn jest packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.test.tsx` Storybook - Go to http://localhost:6006/iframe.html?args=&id=perseuseditor-widgets-interactive-graph--mafs-with-locked-figure-labels-all-flags&viewMode=story - Open the locked line settings - Change the visible label to hvae a mix of TeX (with `$...$`) and non-TeX - Press the "Auto-generate" button - Confirm that the input changes to include spoken math words for the TeX - Also try this with no labels, multiple labels, and the labels changed for the locked points that define the line <img width="930" alt="image" src="https://github.com/user-attachments/assets/7182c93d-5494-46f3-83d7-0dbadad019bd"> Author: nishasy Reviewers: benchristel, nishasy, catandthemachines, #perseus, anakaren-rojas Required Reviewers: Approved By: catandthemachines Checks: ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald Pull Request URL: #1854
- Loading branch information
Showing
3 changed files
with
137 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@khanacademy/perseus": patch | ||
"@khanacademy/perseus-editor": patch | ||
--- | ||
|
||
[Locked Figure Aria] Add math descriptions to locked line aria labels |
This file contains 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
This file contains 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