-
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
[Interactive Graph + Editor] Add aria label and description to entire interactive graph and its UI to the editor #1568
Conversation
Size Change: +568 B (+0.07%) Total Size: 859 kB
ℹ️ View Unchanged
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1568 +/- ##
==========================================
+ Coverage 70.46% 70.98% +0.51%
==========================================
Files 546 572 +26
Lines 106885 111539 +4654
Branches 5533 11930 +6397
==========================================
+ Hits 75319 79176 +3857
- Misses 31450 32363 +913
+ Partials 116 0 -116 see 1118 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (5456ccb) and published it to npm. You Example: yarn add @khanacademy/perseus@PR1568 If you are working in Khan Academy's webapp, you can run: ./dev/tools/bump_perseus_version.sh -t PR1568 |
…dBy refers specifically to an ID
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
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.
The code looks good! I have a design question: what's an example of an aria-label
content creators might set on a graph? It seems like the description field is the most important one. Could the label always be set to something generic like "graph"? I worry that, in the long run, content creators won't understand the distinction between these fields or how to use them effectively.
I imagine my question is already answered somewhere, so please link me to a document or slack thread if there is one.
@benchristel I started a conversation in Slack around your question! It seems like we'd keep both the title and the description regardless, so I'm going to land this. Thank you! |
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/[email protected] ### Major Changes - [#1591](#1591) [`05d048026`](05d0480) Thanks [@handeyeco](https://github.com/handeyeco)! - Move interaction-editor sub-components into perseus-editor ### Minor Changes - [#1568](#1568) [`eddcb9417`](eddcb94) Thanks [@nishasy](https://github.com/nishasy)! - [Interactive Graph + Editor] Add a full graph aria-label and aria-description/describedby to interactive graphs, as well as the UI for content authors to add this in the interactive graph editor ### Patch Changes - [#1540](#1540) [`08068dc71`](08068dc) Thanks [@mark-fitzgerald](https://github.com/mark-fitzgerald)! - Resolve improperly scaled text/labels in Graphie images when viewed in mobile (constrained viewports) - [#1592](#1592) [`d88b0ffdf`](d88b0ff) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Move tests, test data, and Storybook stories for the Interactive Graph widget to the directory specific to that widget. - [#1594](#1594) [`435f3f6d8`](435f3f6) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Remove Storybook stories that generate random widgets - [#1599](#1599) [`71715afd2`](71715af) Thanks [@benchristel](https://github.com/benchristel)! - Internal: improve type safety of interactive graph editor - [#1590](#1590) [`6c4e9e154`](6c4e9e1) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Move InteractiveGraphEditor to its own directory ## @khanacademy/[email protected] ### Minor Changes - [#1600](#1600) [`bdb382fda`](bdb382f) Thanks [@mark-fitzgerald](https://github.com/mark-fitzgerald)! - Interactive Graph - Add example functions for copy/paste to locked functions settings - [#1568](#1568) [`eddcb9417`](eddcb94) Thanks [@nishasy](https://github.com/nishasy)! - [Interactive Graph + Editor] Add a full graph aria-label and aria-description/describedby to interactive graphs, as well as the UI for content authors to add this in the interactive graph editor ### Patch Changes - [#1592](#1592) [`d88b0ffdf`](d88b0ff) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Move tests, test data, and Storybook stories for the Interactive Graph widget to the directory specific to that widget. - [#1591](#1591) [`05d048026`](05d0480) Thanks [@handeyeco](https://github.com/handeyeco)! - Move interaction-editor sub-components into perseus-editor - [#1594](#1594) [`435f3f6d8`](435f3f6) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Remove Storybook stories that generate random widgets - [#1599](#1599) [`71715afd2`](71715af) Thanks [@benchristel](https://github.com/benchristel)! - Internal: improve type safety of interactive graph editor - [#1590](#1590) [`6c4e9e154`](6c4e9e1) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Move InteractiveGraphEditor to its own directory - Updated dependencies \[[`08068dc71`](08068dc), [`d88b0ffdf`](d88b0ff), [`eddcb9417`](eddcb94), [`05d048026`](05d0480), [`435f3f6d8`](435f3f6), [`71715afd2`](71715af), [`6c4e9e154`](6c4e9e1)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#1592](#1592) [`d88b0ffdf`](d88b0ff) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Move tests, test data, and Storybook stories for the Interactive Graph widget to the directory specific to that widget. - [#1594](#1594) [`435f3f6d8`](435f3f6) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Remove Storybook stories that generate random widgets Author: khan-actions-bot Reviewers: mark-fitzgerald Required Reviewers: Approved By: mark-fitzgerald Checks: ❌ codecov/project, ✅ codecov/patch, ✅ Upload Coverage (ubuntu-latest, 20.x), ⏭️ Publish npm snapshot, ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald Pull Request URL: #1597
Summary:
fullGraphAriaLabel
andfullGraphAriaDescription
fields to interactive graph.fullGraphAriaLabel
and/orfullGraphAriaDescription
fields are present, then the graph has the respectivearia-label
andaria-describedby
properties.Issue: https://khanacademy.atlassian.net/browse/LEMS-2283
Test plan:
yarn jest packages/perseus-editor/src/components/__tests__/interactive-graph-description.test.tsx
yarn jest packages/perseus-editor/src/widgets/__tests__/interactive-graph-editor.test.tsx
yarn jest packages/perseus/src/widgets/interactive-graphs/interactive-graph.test.tsx
Storybook
Demo:
Screen.Recording.2024-09-05.at.5.54.30.PM.mov
NOTE! The janky textarea will be replaced with a Wonder Blocks TextArea soon.