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
feat(LEMS-2526): update aria label to include appearance descriptions (#1745)
## Summary:
Updates the aria description to include visual traits
New aria label structure will be:
`Element Type` `Visible Label(s)` `Math Details` `Visual Traits`
Note:
- Other updates to aria descriptions will be submitted in separate PRs
Issue: LEMS-2526
## Test plan:
1. Navigate to[ storybook ](https://650db21c3f5d1b2f13c02952-kiuwtyujyg.chromatic.com/?path=/docs/perseuseditor-editorpage--docs)
2. Add interactive graph widget using the add widget dropdown
3. Scroll down to add locked figure - select any from the dropdown
4. Click auto generate button to see basic auto generated aria label (AL)
5. Update color / line style / fill
6. Re-generate AL by clicking auto generate button to see updated label text
### Expected Behavior
`Visual Traits` of each of the locked figures should change when an input (color, line style, fill) is updated and the generate aria label button is pressed
## Screen recording
https://github.com/user-attachments/assets/9fb228d9-a86e-4c3b-b288-398ced6fb6f2
Author: anakaren-rojas
Reviewers: benchristel, catandthemachines
Required Reviewers:
Approved By: benchristel, 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: #1745
Copy file name to clipboardExpand all lines: packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.test.tsx
Copy file name to clipboardExpand all lines: packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.test.tsx
+11-6
Original file line number
Diff line number
Diff line change
@@ -678,7 +678,8 @@ describe("Locked Function Settings", () => {
678
678
679
679
// Assert
680
680
expect(onChangeProps).toHaveBeenCalledWith({
681
-
ariaLabel: "Function with equation y=x^2",
681
+
ariaLabel:
682
+
"Function with equation y=x^2. Appearance solid gray.",
682
683
});
683
684
});
684
685
@@ -704,7 +705,8 @@ describe("Locked Function Settings", () => {
704
705
705
706
// Assert
706
707
expect(onChangeProps).toHaveBeenCalledWith({
707
-
ariaLabel: "Function with equation x=y^2",
708
+
ariaLabel:
709
+
"Function with equation x=y^2. Appearance solid gray.",
708
710
});
709
711
});
710
712
@@ -730,7 +732,7 @@ describe("Locked Function Settings", () => {
730
732
// Assert
731
733
expect(onChangeProps).toHaveBeenCalledWith({
732
734
ariaLabel:
733
-
"Function with equation y=x^2, domain from 1 to 2",
735
+
"Function with equation y=x^2, domain from 1 to 2. Appearance solid gray.",
734
736
});
735
737
});
736
738
@@ -755,7 +757,8 @@ describe("Locked Function Settings", () => {
755
757
756
758
// Assert
757
759
expect(onChangeProps).toHaveBeenCalledWith({
758
-
ariaLabel: "Function with equation y=x^2",
760
+
ariaLabel:
761
+
"Function with equation y=x^2. Appearance solid gray.",
759
762
});
760
763
});
761
764
@@ -785,7 +788,8 @@ describe("Locked Function Settings", () => {
785
788
786
789
// Assert
787
790
expect(onChangeProps).toHaveBeenCalledWith({
788
-
ariaLabel: "Function A with equation y=x^2",
791
+
ariaLabel:
792
+
"Function A with equation y=x^2. Appearance solid gray.",
789
793
});
790
794
});
791
795
@@ -819,7 +823,8 @@ describe("Locked Function Settings", () => {
819
823
820
824
// Assert
821
825
expect(onChangeProps).toHaveBeenCalledWith({
822
-
ariaLabel: "Function A, B with equation y=x^2",
826
+
ariaLabel:
827
+
"Function A, B with equation y=x^2. Appearance solid gray.",
Copy file name to clipboardExpand all lines: packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.test.tsx
Copy file name to clipboardExpand all lines: packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.test.tsx
Copy file name to clipboardExpand all lines: packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.test.tsx
0 commit comments