-
Notifications
You must be signed in to change notification settings - Fork 592
[Designer] Fix treeview control accessibility #8757
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8b8280e to
29946d4
Compare
Member
Author
|
@anna-dingler / @jwoo-msft / @almedina-ms -- in addition to code review, please take a bit of time to play around with the new navigation model to make sure that it's reasonable to you. Please feel free to ask questions! :) |
jwoo-msft
approved these changes
Nov 21, 2023
29946d4 to
4fbf4a6
Compare
jwoo-msft
pushed a commit
that referenced
this pull request
May 1, 2024
jwoo-msft
added a commit
that referenced
this pull request
May 1, 2024
* Fix `--blue` to be a _smidge_ darker (better contrast on `--black`) (#8745) * Remove unnecessary `aria-required` property from container element (#8746) * Add `hljs-comment` color to fix contrast (#8747) * Switch from textblock to label in Input.Time sample (#8751) * Add missing img alt text in a few spots (#8750) * Slight tweak to common blue background/border color for contrast (#8748) * Add missing `title` to `iframe` in blog post (#8754) * [Samples] Update version for samples using `tooltip` (#8753) * [Designer] Fix treeview control accessibility (#8757) * fixed a11y issue (#8760) * Update README.md (#8802) * Added AdaptiveCards Template WinRT Component (#8805) * added a new project file * added test app and c# winrt component * mostly working? * fix impl * updated nuget path * added c# runtime component * updated * updated * updated * updated * updated * updated * updated * updated * update * removed winrt prject from AC and added C++ console sample app and the AC project to visualizer * removed nuget config changes --------- Co-authored-by: Paul Campbell <paulcam@microsoft.com> * Jwoo/template winrt strong name (#8807) * added a new project file * added test app and c# winrt component * mostly working? * fix impl * updated nuget path * added c# runtime component * updated * updated * updated * updated * updated * updated * updated * updated * update * removed winrt prject from AC and added C++ console sample app and the AC project to visualizer * removed nuget config changes * added strong name * added new property --------- Co-authored-by: Paul Campbell <paulcam@microsoft.com> * Added Package Info (#8811) * added missing package info * for sharing * updated * Update README.md (#8813) * Add headingLevel to host config (#8814) * Update action icon role to presentation (#8815) * Update README.md (#8817) Update release schedule for website * Fix invalid color value (#8819) * [NodeJS] Update hashing algorithm for webpack (#8835) * Update hashing algorithm for webpack Needed to unblock Node >16 * Tabs -> spaces * [NodeJS] Add `ImageSet` class to enable styling (#8838) * [NodeJS] Add optional overflow menu icon rendering (#8847) * Remove tab index from nested inputs (#8848) * [NodeJS] Add `grid` `ImageSet` style (#8845) * Host old content from messagecardplayground on ac.io (#8866) * Fix issue #8520 (#8870) Updated AdaptiveTableCell to override the Type property Co-authored-by: huberemanuel <emanuel.tesv@gmail.com> * Update README.md (#8873) Update icon for unsupported features * Update README.md (#8859) * Add tooltip for Arabic (#8890) * [Website][A11y] Update keyboard nav for blog posts (#8891) * Update keyboard nav for blog posts * Add up/down navigation * Navigate on enter * Designer surface a11y updates (#8888) * Designer surface a11y updates * Update source/nodejs/adaptivecards-designer/src/peer-command.ts Co-authored-by: Paul Campbell <paulcam@microsoft.com> --------- Co-authored-by: Paul Campbell <paulcam@microsoft.com> --------- Co-authored-by: Paul Campbell <paulcam@microsoft.com> Co-authored-by: anna-dingler <98650930+anna-dingler@users.noreply.github.com> Co-authored-by: Matej Simek <matej@simek.pro> Co-authored-by: huberemanuel <emanuel.tesv@gmail.com>
jwoo-msft
added a commit
that referenced
this pull request
May 1, 2024
* Fix `--blue` to be a _smidge_ darker (better contrast on `--black`) (#8745) * Remove unnecessary `aria-required` property from container element (#8746) * Add `hljs-comment` color to fix contrast (#8747) * Switch from textblock to label in Input.Time sample (#8751) * Add missing img alt text in a few spots (#8750) * Slight tweak to common blue background/border color for contrast (#8748) * Add missing `title` to `iframe` in blog post (#8754) * [Samples] Update version for samples using `tooltip` (#8753) * [Designer] Fix treeview control accessibility (#8757) * fixed a11y issue (#8760) * Update README.md (#8802) * Added AdaptiveCards Template WinRT Component (#8805) * added a new project file * added test app and c# winrt component * mostly working? * fix impl * updated nuget path * added c# runtime component * updated * updated * updated * updated * updated * updated * updated * updated * update * removed winrt prject from AC and added C++ console sample app and the AC project to visualizer * removed nuget config changes --------- Co-authored-by: Paul Campbell <paulcam@microsoft.com> * Jwoo/template winrt strong name (#8807) * added a new project file * added test app and c# winrt component * mostly working? * fix impl * updated nuget path * added c# runtime component * updated * updated * updated * updated * updated * updated * updated * updated * update * removed winrt prject from AC and added C++ console sample app and the AC project to visualizer * removed nuget config changes * added strong name * added new property --------- Co-authored-by: Paul Campbell <paulcam@microsoft.com> * Added Package Info (#8811) * added missing package info * for sharing * updated * Update README.md (#8813) * Add headingLevel to host config (#8814) * Update action icon role to presentation (#8815) * Update README.md (#8817) Update release schedule for website * Fix invalid color value (#8819) * [NodeJS] Update hashing algorithm for webpack (#8835) * Update hashing algorithm for webpack Needed to unblock Node >16 * Tabs -> spaces * [NodeJS] Add `ImageSet` class to enable styling (#8838) * [NodeJS] Add optional overflow menu icon rendering (#8847) * Remove tab index from nested inputs (#8848) * [NodeJS] Add `grid` `ImageSet` style (#8845) * Host old content from messagecardplayground on ac.io (#8866) * Fix issue #8520 (#8870) Updated AdaptiveTableCell to override the Type property Co-authored-by: huberemanuel <emanuel.tesv@gmail.com> * Update README.md (#8873) Update icon for unsupported features * Update README.md (#8859) * Add tooltip for Arabic (#8890) * [Website][A11y] Update keyboard nav for blog posts (#8891) * Update keyboard nav for blog posts * Add up/down navigation * Navigate on enter * Designer surface a11y updates (#8888) * Designer surface a11y updates * Update source/nodejs/adaptivecards-designer/src/peer-command.ts Co-authored-by: Paul Campbell <paulcam@microsoft.com> --------- Co-authored-by: Paul Campbell <paulcam@microsoft.com> * updated version --------- Co-authored-by: Paul Campbell <paulcam@microsoft.com> Co-authored-by: anna-dingler <98650930+anna-dingler@users.noreply.github.com> Co-authored-by: Matej Simek <matej@simek.pro> Co-authored-by: huberemanuel <emanuel.tesv@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This was a bit of a ride. Prior to this change, the Designer's treeview control is represented in the DOM by a structure something like this:
Unfortunately, it's not valid to have
role="treeitem"on an element unless its parent'sroleis eithergrouportree. It turns out that, while eliding theroleon theli > divcauses a11y tooling to stop complaining, it also totally breaks keyboard navigation -- the user can't actually select an element in the tree because they can't put keyboard focus on the right element.So I did what anyone would do and basically rewrote keyboard navigation for the treeview control.
The old model was tab-based. Each node in the tree and each expand/collapse chevron had
tabIndex="0". With focus on a node in the tree,<Tab>effectively means "if this node has children, focus the expand/collapse chevron", otherwise focus the next nearest sibling.<SPC>or<RET>means "expand/collapse children" or "select this node" depending on what's currently in focus. Aside from not matching a11y best practices for Treeviews, this approach has a number of downsides from a usability perspective:Columns, the user must press<S-TAB>20 times to put focus on the parentColumnSet<TAB>or<S-TAB>a bunch of times to get out of the treeThe new model follows the aforementioned best practices:
<LEFT>,<RIGHT>,<UP>, and<DOWN>)tabIndexapproach to track which tree item is selected.<RET>(<ENTER>) puts keyboard focus on the first focusable element in the selected item's properties page.How Verified
Local build, devtools, Accessibility Insights, Narrator