-
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
Let interactive graph components render a screenreader description #1815
Conversation
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
Size Change: +203 B (+0.02%) Total Size: 857 kB
ℹ️ View Unchanged
|
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (9e13cc0) and published it to npm. You Example: yarn add @khanacademy/perseus@PR1815 If you are working in Khan Academy's webapp, you can run: ./dev/tools/bump_perseus_version.sh -t PR1815 |
screenreaderDescription: null, | ||
}; | ||
} | ||
|
||
export function AngleGraph(props: AngleGraphProps) { |
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.
Since all these graphs are no longer being rendered directly outside their respective files (<AngleGraph />
==> renderAngleGraph()
), can we remove the export
for all of these?
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.
There's an index.ts
file in this directory that exports most of the graph components. Perhaps we should remove that. If we did, then I think this wouldn't need to be exported.
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.
Is the index.ts
file only for exporting things that would be used outside this package? I feel like we could probably remove that, but I don't think that should block this in any case.
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.
It seems that nothing imports from the index.ts file, so I'm going to remove it.
91ae0da
to
368ac54
Compare
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.
Makes sense to me
This refactoring will make it easy for each graph subtype (segment, point,
linear-system, etc.) to describe itself to a screenreader.
At this point, no graph actually renders a screenreader description. Future
PRs will add descriptions for each graph type.
Issue: https://khanacademy.atlassian.net/browse/LEMS-1725
Test plan:
yarn test