-
Notifications
You must be signed in to change notification settings - Fork 352
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
Enable keyboard selection of movable points #991
Conversation
This is a step toward making interactive graphs keyboard- and screen-reader-accessible. Issue: https://khanacademy.atlassian.net/browse/LC-1666 Test plan: ``` yarn dev open http://localhost:5173 ``` Press `tab` repeatedly. The movable points on the graphs should be selected in turn, with a visible outline on the selected point.
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
@nedredmond this is a spike—I still need to figure out why exactly this works, if there's a better way to do it, how to test it, etc. But it's a first step toward a solution. |
Size Change: +61 B (0%) Total Size: 814 kB
ℹ️ View Unchanged
|
@@ -60,6 +60,7 @@ const draw = { | |||
radii, | |||
options, | |||
); | |||
this.state.visibleShape.wrapper.setAttribute("tabindex", "0") |
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.
I think we should be using WB Clickable here for better control over states.
@@ -969,6 +969,7 @@ _.extend(GraphUtils.Graphie.prototype, { | |||
radii, | |||
options, | |||
); | |||
movablePoint.mouseTarget.wrapper.setAttribute("tabindex", "0") |
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.
We have some designs, don't we? Even if we get the browser focus defaults, this won't give us consistency across browsers. Let's look at our designs and at least give that a shot
Closing this, since we're moving ahead with a Mafs-based solution. |
Summary:
This is a step toward making interactive graphs keyboard- and
screen-reader-accessible.
Issue: https://khanacademy.atlassian.net/browse/LC-1666
Test plan:
Press
tab
repeatedly. The movable points on the graphs should beselected in turn, with a visible outline on the selected point.