-
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
[SR] Linear graph - add grab handle description and aria lives #2025
Conversation
The [SRUX doc](https://khanacademy.atlassian.net/wiki/spaces/LC/pages/3460366348/Linear) still needs a label for the grab handle, but I tried my best in the meantime. - Add a label and describedby for the grab handle. - Add aria-live states for the different interactive elements so they don't override each other. Issue: https://khanacademy.atlassian.net/browse/LEMS-1726 Test plan: `yarn jest packages/perseus/src/widgets/interactive-graphs/graphs/linear.test.tsx` Storybook - http://localhost:6006/iframe.html?id=perseuseditor-widgets-interactive-graph--interactive-graph-linear&viewMode=story - Try all the different slopes and intercepts - Move different elements and confirm that the updated aria-label is what is read out, and none of the other elements override the currently focused one.
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (6c7ecb5) and published it to npm. You Example: yarn add @khanacademy/perseus@PR2025 If you are working in Khan Academy's webapp, you can run: ./dev/tools/bump_perseus_version.sh -t PR2025 |
Size Change: +403 B (+0.03%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
// Indicate that this element is interactive. | ||
// As a bonus, giving this group a non-group role makes | ||
// the screen reader skip over its empty children. | ||
role="button" |
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 re-read the whole graph section of the SRUX doc earlier and noticed I missed this
An appropriate semantic element or role for the graph as a whole is figure.
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 missed that too.
I think this line is still button
since it's referring to the grab handle, but I think I'll have to add figure
to the parent layer.
@@ -50,21 +56,36 @@ describe("Linear graph screen reader", () => { | |||
); | |||
}); | |||
|
|||
test("should have aria labels for both points on the line", () => { | |||
test("should have aria labels and describedbys for both points and grab handle on the line", () => { |
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.
this might need to be 4 separate tests: point + aria label, point + description, grab handle + aria label, grab handle + description
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] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2034](#2034) [`8e9b2395d`](8e9b239) Thanks [@catandthemachines](https://github.com/catandthemachines)! - Removing final usage of createReactClass. - [#2025](#2025) [`b52310d1b`](b52310d) Thanks [@nishasy](https://github.com/nishasy)! - [SR] Linear graph - add grab handle description and aria lives - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - [#2033](#2033) [`881c0aac3`](881c0aa) Thanks [@nishasy](https://github.com/nishasy)! - [Interactive Graph][axis labels] Make default x & y axis labels TeX on load - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check ## @khanacademy/[email protected] ### Patch Changes - [#2034](#2034) [`8e9b2395d`](8e9b239) Thanks [@catandthemachines](https://github.com/catandthemachines)! - Removing final usage of createReactClass. - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - [#2033](#2033) [`881c0aac3`](881c0aa) Thanks [@nishasy](https://github.com/nishasy)! - [Interactive Graph][axis labels] Make default x & y axis labels TeX on load - Updated dependencies \[[`8e9b2395d`](8e9b239), [`b52310d1b`](b52310d), [`b80e7882b`](b80e788), [`881c0aac3`](881c0aa)]: - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected]
Summary:
The SRUX doc still needs a label for the grab handle, but I tried my best in the meantime.
so they don't override each other.
Issue: https://khanacademy.atlassian.net/browse/LEMS-1726
Test plan:
yarn jest packages/perseus/src/widgets/interactive-graphs/graphs/linear.test.tsx
Storybook
is what is read out, and none of the other elements override the
currently focused one.
Screen.Recording.2024-12-17.at.5.09.05.PM.mov