-
Notifications
You must be signed in to change notification settings - Fork 540
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
[Designer Accessibility] Insert peers in the DOM tree in the correct order #7514
[Designer Accessibility] Insert peers in the DOM tree in the correct order #7514
Conversation
…r/AdaptiveCards into accessibilityUpdates
Hi @anna-dingler. Thanks for helping make the AdaptiveCards JS renderer + tooling better. As additional verification, once the JS build succeeds, please go to the test site to test out your website/designer changes. |
source/nodejs/adaptivecards-designer/src/card-designer-surface.ts
Outdated
Show resolved
Hide resolved
source/nodejs/adaptivecards-designer/src/card-designer-surface.ts
Outdated
Show resolved
Hide resolved
source/nodejs/adaptivecards-designer/src/card-designer-surface.ts
Outdated
Show resolved
Hide resolved
…r/AdaptiveCards into accessibilityUpdates
Cherry pick "peers are tabbable, action buttons are not"
source/nodejs/adaptivecards-designer/src/card-designer-surface.ts
Outdated
Show resolved
Hide resolved
source/nodejs/adaptivecards-designer/src/card-designer-surface.ts
Outdated
Show resolved
Hide resolved
Merge in accessibility updates
Hi @anna-dingler. This pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along. |
Staleness reset by anna-dingler |
1 similar comment
Staleness reset by anna-dingler |
source/nodejs/adaptivecards-designer/src/card-designer-surface.ts
Outdated
Show resolved
Hide resolved
…into accessibilityUpdates
I'm not sure. This seems quite complicated. Wouldn't setting |
It's very interesting. Before dive into it, make sure it will not break any rule of tabindex |
There are two choices (that I know of) to make navigation between DOM elements via the keyboard (or narration) happen in the intended order:
It definitely seems to me that the second option would yield a much simpler implementation. That said, I could be totally wrong. |
I've pinging @carlos-zamora to see if he has any context about this :) |
I spoke to @carlos-zamora (relaying the info here), and I think having the DOM tree in the correct order makes sense. If we used a non-zero Additionally, it is best practice to use |
@anna-dingler thanks Anna for making the right choice. Having the correct DOM tree order makes much more sense as Adaptive Cards is an UI component and live in other apps. If Adaptive Cards is its own app, yes, you can control But Adaptive Cards is a UI component and hosted in apps that AC has no control/influence over. We should not use |
…order (microsoft#7514) * Update popup background color for high contrast mode * In progress: fix designer surface peer ordering * In progress: use neighboring peer to find the correct place in the html tree * Cherry-pick 'peers are tabbable, action buttons are not' * Use parent peer instead of dropTarget * Changes to account for card element actions (ex: add a column button) * Merge in accessibility updates * Resolve PR comments * Find DOM neighbor for new ActionSet item * Update addPeer method
Related Issue
Progress towards #7436
Description
Instead of inserting designer peers to the bottom of the HTML tree, we must insert designer peers to mimic the order of the card.
To do so, I added a new method to find the correct placement before adding the new element to the designer surface.
How Verified
Verified manually on the adaptive cards website.
Outstanding Issues
Media
element does not always update the heigh of the entire card correctly, so some of the peers overlap. I was able to repro on older version of the site as well.Input.Toggle
is still focusable)Microsoft Reviewers: Open in CodeFlow