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

[JS] Emit "invisible" borders for containers #4727

Merged
merged 1 commit into from
Sep 2, 2020

Conversation

paulcam206
Copy link
Member

@paulcam206 paulcam206 commented Sep 2, 2020

Related Issue

Fixes VSO 24095690

Description

When a user puts their system in high contrast mode, their user agent will override CSS properties in order to display content in the same high contrast mode. There's no way for us (the website) to know if this is happening. The user will of course lose some of our styling cues (e.g. TextBlock's color property). This is expected, but we are losing one critical bit of useful visual state -- container borders.

Here's what our Container sample card looks like:

Normal High Contrast Black
image image

The fix on our end is to emit an "invisible" border on containers (specifically, we emit a 1px solid border that is the same color as the container's backgroundColor). Here's how it looks with our fix:

Normal High Contrast Black
image image

How Verified

  • local build
Microsoft Reviewers: Open in CodeFlow

@paulcam206 paulcam206 added the Area-Accessibility Bugs around feature accessibility label Sep 2, 2020
@ghost
Copy link

ghost commented Sep 2, 2020

Hi @paulcam206. 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.

@paulcam206 paulcam206 added the Platform-JavaScript Bugs or features related to the JavaScript renderer label Sep 2, 2020
@paulcam206 paulcam206 merged commit 3477956 into main Sep 2, 2020
@paulcam206 paulcam206 deleted the paulcam/container-borders branch September 2, 2020 21:59
paulcam206 added a commit that referenced this pull request Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Accessibility Bugs around feature accessibility Platform-JavaScript Bugs or features related to the JavaScript renderer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants