diff --git a/CHANGELOG.md b/CHANGELOG.md index 537eeeabe8..100dbc727b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,6 +78,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixes [#4863](https://github.com/microsoft/BotFramework-WebChat/issues/4863). Disable dark theme for link references until chat history has dark theme support, by [@compulim](https://github.com/compulim), in PR [#4864](https://github.com/microsoft/BotFramework-WebChat/pull/4864) - Fixes [#4866](https://github.com/microsoft/BotFramework-WebChat/issues/4866). Citation modal show fill screen width on mobile device and various fit-and-finish, by [@compulim](https://github.com/compulim), in PR [#4867](https://github.com/microsoft/BotFramework-WebChat/pull/4867) - Fixes [#4878](https://github.com/microsoft/BotFramework-WebChat/issues/4878). `createStore` should return type of `Redux.Store`, by [@compulim](https://github.com/compulim), in PR [#4877](https://github.com/microsoft/BotFramework-WebChat/pull/4877) +- Fixes [#4907](https://github.com/microsoft/BotFramework-WebChat/issues/4907). Link references in high contrast mode should use `LinkText` color, by [@compulim](https://github.com/compulim), in PR [#4908](https://github.com/microsoft/BotFramework-WebChat/pull/4908) - Fixes [#4957](https://github.com/microsoft/BotFramework-WebChat/issues/4957). Native chevron of the accordion in citation should be hidden, by [@compulim](https://github.com/compulim), in PR [#4958](https://github.com/microsoft/BotFramework-WebChat/pull/4958) ### Added diff --git a/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-1-snap.png b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-1-snap.png new file mode 100644 index 0000000000..73ce179124 Binary files /dev/null and b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-2-snap.png b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-2-snap.png new file mode 100644 index 0000000000..d36a6544ff Binary files /dev/null and b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-3-snap.png b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-3-snap.png new file mode 100644 index 0000000000..59dbb98dd8 Binary files /dev/null and b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-4-snap.png b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-4-snap.png new file mode 100644 index 0000000000..d4ede3f147 Binary files /dev/null and b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-4-snap.png differ diff --git a/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-5-snap.png b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-5-snap.png new file mode 100644 index 0000000000..a452973934 Binary files /dev/null and b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-5-snap.png differ diff --git a/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-6-snap.png b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-6-snap.png new file mode 100644 index 0000000000..93a27bb806 Binary files /dev/null and b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-6-snap.png differ diff --git a/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-7-snap.png b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-7-snap.png new file mode 100644 index 0000000000..dbd8484403 Binary files /dev/null and b/__tests__/__image_snapshots__/html/citation-high-contrast-js-citation-in-high-contrast-should-work-7-snap.png differ diff --git a/__tests__/html/citation.highContrast.html b/__tests__/html/citation.highContrast.html new file mode 100644 index 0000000000..24a2bb4e96 --- /dev/null +++ b/__tests__/html/citation.highContrast.html @@ -0,0 +1,87 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html/citation.highContrast.js b/__tests__/html/citation.highContrast.js new file mode 100644 index 0000000000..3b887db5c1 --- /dev/null +++ b/__tests__/html/citation.highContrast.js @@ -0,0 +1,5 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('citation in high contrast', () => { + test('should work', () => runHTML('citation.highContrast.html')); +}); diff --git a/packages/component/src/Styles/StyleSet/LinkDefinitions.ts b/packages/component/src/Styles/StyleSet/LinkDefinitions.ts index 4a769e42c8..991d33f980 100644 --- a/packages/component/src/Styles/StyleSet/LinkDefinitions.ts +++ b/packages/component/src/Styles/StyleSet/LinkDefinitions.ts @@ -138,7 +138,11 @@ export default function createLinkDefinitionsStyleSet() { overflow: 'hidden', textDecoration: 'underline', textOverflow: 'ellipsis', - whiteSpace: 'nowrap' + whiteSpace: 'nowrap', + + [FORCED_COLORS_SELECTOR]: { + color: 'LinkText' + } }, '.webchat__link-definitions__open-in-new-window-icon': { diff --git a/packages/test/harness/src/browser/globals/checkAccessibility.js b/packages/test/harness/src/browser/globals/checkAccessibility.js index 4bc7787a15..23e2160880 100644 --- a/packages/test/harness/src/browser/globals/checkAccessibility.js +++ b/packages/test/harness/src/browser/globals/checkAccessibility.js @@ -43,7 +43,7 @@ export default function initializeCheckAccessibility() { try { console.log('[TESTHARNESS] Accessibility checks started.'); - const results = await axe.run(); + const results = await axe.run(window.checkAccessibilityRunOptions); const { violations } = results; if (!violations?.length) { diff --git a/packages/test/harness/src/browser/globals/run.js b/packages/test/harness/src/browser/globals/run.js index 98da680c46..595cdeb3dc 100644 --- a/packages/test/harness/src/browser/globals/run.js +++ b/packages/test/harness/src/browser/globals/run.js @@ -26,6 +26,8 @@ export default function () { document.body.prepend(header); + window.checkAccessibilityRunOptions = doneOptions.axeCoreRunOptions || {}; + window.addEventListener('error', event => host.error(event.error)); // Run the test, signal start by host.ready().