Skip to content

feat(charts): Improve accessibility with keyboard interaction - #1964

Open
akashsonune wants to merge 1 commit into
mainfrom
feat/charts-keyboard-interaction
Open

feat(charts): Improve accessibility with keyboard interaction#1964
akashsonune wants to merge 1 commit into
mainfrom
feat/charts-keyboard-interaction

Conversation

@akashsonune

@akashsonune akashsonune commented Apr 27, 2026

Copy link
Copy Markdown
Member
  • Traverse legend items with arrow keys (custom legend only)
  • Select/Unselect legend item with Enter/space
  • Tab to move to charts view with tooltip opened
  • Traverse through each data point with arrow keys
  • Escape to close tooltip
  • Use Shift +/- Shift arrows home to operate zoom slider

Documentation.
Examples.
Dashboards Demo.
Playwright report.

Coverage Reports:

Code Coverage

@akashsonune
akashsonune force-pushed the feat/charts-keyboard-interaction branch from b356d7e to 2edee9c Compare April 27, 2026 17:48

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements accessibility features for charts, including keyboard navigation for data points, zoom sliders, and legends, as well as ARIA support and live announcements. The review feedback identifies several TypeScript style guide violations regarding the use of the any type and suggests improvements for ARIA label redundancy and legend navigation logic.

Comment thread projects/charts-ng/common/si-chart-base.component.html Outdated
Comment thread projects/charts-ng/common/si-chart-base.component.ts Outdated
Comment thread projects/charts-ng/common/si-chart-base.component.ts Outdated
Comment thread projects/charts-ng/common/si-chart-base.component.ts
Comment thread projects/charts-ng/common/si-chart-base.component.ts Outdated
Comment thread projects/charts-ng/common/si-chart-base.component.ts Outdated
Comment thread projects/charts-ng/common/si-chart-base.component.ts Outdated
Comment thread projects/charts-ng/common/si-chart-base.component.ts Outdated
@akashsonune
akashsonune force-pushed the feat/charts-keyboard-interaction branch 4 times, most recently from 1778050 to e3e5eba Compare April 27, 2026 19:50
@akashsonune
akashsonune requested review from dr-itz and panch1739 April 27, 2026 19:55
@akashsonune
akashsonune force-pushed the feat/charts-keyboard-interaction branch 2 times, most recently from 83b4548 to c311421 Compare April 28, 2026 07:29
@dr-itz

dr-itz commented Apr 28, 2026

Copy link
Copy Markdown
Member

Focus is barely visible, needs to be in our focus color. Why not just have the focus border around the whole element?
Screenshot 2026-04-28 at 13 44 35

@akashsonune
akashsonune force-pushed the feat/charts-keyboard-interaction branch from c311421 to 21eb1b1 Compare April 28, 2026 13:59
@akashsonune

Copy link
Copy Markdown
Member Author

Focus is barely visible, needs to be in our focus color. Why not just have the focus border around the whole element? Screenshot 2026-04-28 at 13 44 35

done. Not sure about focusing the whole element, I see that the other libs like carbon focus just the legend icon. Maybe we can discuss this along with ux

@akashsonune
akashsonune force-pushed the feat/charts-keyboard-interaction branch from 21eb1b1 to 790fd7c Compare April 28, 2026 18:32
@akashsonune
akashsonune force-pushed the feat/charts-keyboard-interaction branch from 790fd7c to 0f8f511 Compare June 17, 2026 14:07
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown

⬇️ Download VRTs

@akashsonune
akashsonune force-pushed the feat/charts-keyboard-interaction branch 2 times, most recently from aa74c74 to a222173 Compare June 17, 2026 18:57
@akashsonune
akashsonune marked this pull request as ready for review June 18, 2026 05:54
@akashsonune
akashsonune requested review from a team as code owners June 18, 2026 05:54
@akashsonune

Copy link
Copy Markdown
Member Author

@dr-itz can you take a look

@akashsonune

Copy link
Copy Markdown
Member Author

@dr-itz can you review

@dr-itz dr-itz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examples aren't live any more, so I cannot test. Also, please squash the commits

Comment thread projects/charts-ng/common/si-chart-base.component.ts Outdated
Comment thread projects/charts-ng/common/si-chart-base.component.ts
@spike-rabbit spike-rabbit added this to the 51.x milestone Jul 8, 2026
@akashsonune
akashsonune force-pushed the feat/charts-keyboard-interaction branch 3 times, most recently from 03935a4 to f3c0ee2 Compare July 21, 2026 09:57
@akashsonune
akashsonune force-pushed the feat/charts-keyboard-interaction branch 5 times, most recently from 6d2bdd3 to 6e5cfbf Compare July 22, 2026 08:46
@akashsonune
akashsonune requested a review from dr-itz July 22, 2026 09:37
@akashsonune

Copy link
Copy Markdown
Member Author

@dr-itz I think you should see the examples now. please check

@akashsonune

Copy link
Copy Markdown
Member Author

@dr-itz Ping

@spike-rabbit spike-rabbit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why we build this ourself? Seems like echarts has some aria modules: https://echarts.apache.org/handbook/en/best-practices/aria

@akashsonune

Copy link
Copy Markdown
Member Author

Is there a reason why we build this ourself? Seems like echarts has some aria modules: https://echarts.apache.org/handbook/en/best-practices/aria

@spike-rabbit The echarts aria modules have some limitations, I had listed the observation under #1973 and the related PR for echarts aria modules- #1735

The echarts aria modules mainly help in third case of charts usage i.e. iterating through all raw data
image
But since there is no way to pause/stop this, also can be very long text, it is not very useful.

I had a discussion with accessibility team along with @panch1739 and we decided to cover this third case later. There, we can also revisit the echarts aria module and other options to read the raw series data.

Comment thread projects/charts-ng/common/si-chart-base.component.ts Outdated
Comment thread projects/charts-ng/custom-legend/si-custom-legend.component.html Outdated
@akashsonune
akashsonune force-pushed the feat/charts-keyboard-interaction branch 3 times, most recently from 71ebfcf to d95e9fa Compare August 20, 2026 06:11
@akashsonune
akashsonune force-pushed the feat/charts-keyboard-interaction branch from d95e9fa to 4ef7328 Compare August 20, 2026 06:35
@akashsonune akashsonune assigned spike-rabbit and unassigned dr-itz Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants