Skip to content
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

Further accessibility fixes #2176

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

caaavik-msft
Copy link
Contributor

This PR resolves some more accessibility bugs with PerfView.

There were some major changes to the flame graph:

  • Fixed a bug where only two of the 100 randomly generated flame graph colors were used, now we have our random colors again
  • Updated the color generator to ensure that all colors have sufficient contrast with the text and background
  • Added a border around flame boxes to allow for light coloured flame boxes (e.g. yellow) to have sufficient contrast against the background
  • Fixed some bugs regarding rendering at different zoom levels. We now re-render every time the zoom level is updated. This might need some additional testing on some large traces to ensure it can handle it, but it seemed to handle fine on my machine with some test traces I made.
  • Allowed keyboard focus on the entire flame graph canvas and ensured that it would get announced as a flame graph to screen readers, however there is still no ability to perform keyboard navigation inside the flame graph.
  • The help link for the flame graph is now keyboard navigable, so users with screen readers will be able to use that and understand that the flame graph is an alternate visualization of data that can be accessed using the other windows in the stack viewer. This should be sufficient for us to not have to implement a full automation peer for the flame graph (although that would be nice as a future PR) and comply with accessibility requirements.

New flame graph look with color contrasting and borders for both colour schemes:
image
image

In addition, there were also the following changes:

  • Ensured that all help links are keyboard navigable, some were disabled as a tab stop.
  • Ensured that all help links have appropriate automation names as some were just a wrapper around a "?"
  • Fixed keyboard focusing issues with the Cpu Ctrs box in the Run Command dialog
  • Ensured that DataGrid column headers are focusable (and can be navigated to with tabs)
  • Changed default text formatting to use "Display" mode, which works better for small text which we have a lot of.
  • Changed some of the background colours to be a bit lighter to add more contrast.

There are three more bugs I want to resolve before I merge in this PR, but am making this PR now to get the review process started:

  • The border that shows up when hovering over a menu item does not have sufficient contrast with the background
    • It seems the only way to fix this is to clone the >600 line ControlTemplate for MenuItem just so that we can change the BorderBrush when highlighted or selected. But want to make sure there is not a cleaner way to do that first.
  • Some controls do not handle window resizing or text size 200% well and it leads to text being truncated
  • HistoryComboBox controls do not announce the currently selected item when using the keyboard.
    • I believe this might be a bug with Windows Narrator, but will confirm with WPF team to be sure and if so will not need to address this in this PR.

@caaavik-msft caaavik-msft requested a review from brianrob as a code owner March 18, 2025 19:27
Copy link
Contributor

@cincuranet cincuranet left a comment

Choose a reason for hiding this comment

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

Nice!

Let me know whether you want to merge in current state (and create another PRs) or add more stuff into this PR.

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.

2 participants