From 76ebd2623b8e9fad6db3d2174989732ae27f6a4b Mon Sep 17 00:00:00 2001 From: William Wong Date: Fri, 24 Mar 2023 22:11:51 +0000 Subject: [PATCH] Change subtle color --- CHANGELOG.md | 2 ++ .../html/accessibility.adaptiveCard.withTapAction.html | 2 +- .../accessibility.adaptiveCard.withoutTapAction.html | 2 +- __tests__/html/adaptiveCards.tapAction.html | 3 ++- __tests__/html/autoScroll.acknowledgement.html | 5 ++++- __tests__/html/autoScroll.snap.activity.html | 3 ++- __tests__/html/autoScroll.snap.activityAndPage.html | 3 ++- __tests__/html/autoScroll.snap.default.html | 9 ++++++++- __tests__/html/autoScroll.snap.page.html | 5 ++++- .../html/focusManagement.disableAdaptiveCard.manual.html | 2 +- .../html/focusManagement.disableHeroCard.obsolete.html | 3 ++- __tests__/html/focusManagement.disableUI.html | 2 +- ...ocusManagement.scrollToEndButton.receiveHeroCard.html | 3 ++- ...focusManagement.scrollToEndButton.receiveMessage.html | 3 ++- __tests__/html/focusManagement.sendBoxTextBoxSubmit.html | 3 ++- __tests__/html/focusManagement.sendFailedRetry.html | 3 ++- __tests__/html/focusManagement.suggestedActions.html | 3 ++- ...cript.navigation.behavior.proactive.adaptiveCard.html | 9 ++++++++- ...transcript.navigation.behavior.proactive.message.html | 9 ++++++++- .../transcript.navigation.scrollIntoView.keyboard.html | 3 ++- .../html/transcript.navigation.scrollIntoView.mouse.html | 3 ++- __tests__/html/useTextBoxSubmit.main.html | 3 ++- __tests__/html/useTextBoxSubmit.sendBox.html | 3 ++- .../html/useTextBoxSubmit.sendBoxWithoutKeyboard.html | 3 ++- 24 files changed, 66 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a09694ba74..583269fe75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixes [#4557](https://github.com/microsoft/BotFramework-WebChat/issues/4557). Flipper buttons in carousels and suggested actions is now renamed to "next/previous" from "left/right", by [@compulim](https://github.com/compulim), in PR [#4646](https://github.com/microsoft/BotFramework-WebChat/pull/4646) - Fixes [#4652](https://github.com/microsoft/BotFramework-WebChat/issues/4652). Keyboard help screen, activity focus traps, and chat history terminator should not be hidden behind `aria-hidden` because they are focusable, by [@compulim](https://github.com/compulim), in PR [#4659](https://github.com/microsoft/BotFramework-WebChat/pull/4659) +- Related to [#4650](https://github.com/microsoft/BotFramework-WebChat/issues/4650). Added automated accessibility check using [`axe-core`](https://npmjs.com/package/axe-core) + - HTML test: changed contrast ratio in tests that use different background colors, by [@compulim](https://github.com/compulim), in PR [#XXX](https://github.com/microsoft/BotFramework-WebChat/pull/XXX) ### Changed diff --git a/__tests__/html/accessibility.adaptiveCard.withTapAction.html b/__tests__/html/accessibility.adaptiveCard.withTapAction.html index a51d514db1..2d4d7c1998 100644 --- a/__tests__/html/accessibility.adaptiveCard.withTapAction.html +++ b/__tests__/html/accessibility.adaptiveCard.withTapAction.html @@ -13,7 +13,7 @@ run(async function () { const store = testHelpers.createStore(); const directLine = WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() }); - const baseProps = { directLine, store }; + const baseProps = { directLine, store, styleOptions: { subtle: '#666' } }; const webChatElement = document.getElementById('webchat'); WebChat.renderWebChat(baseProps, webChatElement); diff --git a/__tests__/html/accessibility.adaptiveCard.withoutTapAction.html b/__tests__/html/accessibility.adaptiveCard.withoutTapAction.html index a858f9114b..6aab7a925e 100644 --- a/__tests__/html/accessibility.adaptiveCard.withoutTapAction.html +++ b/__tests__/html/accessibility.adaptiveCard.withoutTapAction.html @@ -13,7 +13,7 @@ run(async function () { const store = testHelpers.createStore(); const directLine = WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() }); - const baseProps = { directLine, store }; + const baseProps = { directLine, store, styleOptions: { subtle: '#666' } }; const webChatElement = document.getElementById('webchat'); WebChat.renderWebChat(baseProps, webChatElement); diff --git a/__tests__/html/adaptiveCards.tapAction.html b/__tests__/html/adaptiveCards.tapAction.html index 50094312e2..3512ec8b27 100644 --- a/__tests__/html/adaptiveCards.tapAction.html +++ b/__tests__/html/adaptiveCards.tapAction.html @@ -40,7 +40,8 @@ WebChat.renderWebChat( { directLine, - store: testHelpers.createStore() + store: testHelpers.createStore(), + styleOptions: { subtle: '#666' } }, document.getElementById('webchat') ); diff --git a/__tests__/html/autoScroll.acknowledgement.html b/__tests__/html/autoScroll.acknowledgement.html index ab3de7b805..c452cf7994 100644 --- a/__tests__/html/autoScroll.acknowledgement.html +++ b/__tests__/html/autoScroll.acknowledgement.html @@ -86,7 +86,10 @@ { directLine, store, - styleOptions: { autoScrollSnapOnPage: true } + styleOptions: { + autoScrollSnapOnPage: true, + subtle: '#666' + } }, webChatElement ); diff --git a/__tests__/html/autoScroll.snap.activity.html b/__tests__/html/autoScroll.snap.activity.html index 2c5f4bf749..c28ccccb70 100644 --- a/__tests__/html/autoScroll.snap.activity.html +++ b/__tests__/html/autoScroll.snap.activity.html @@ -62,7 +62,8 @@ store, styleOptions: { autoScrollSnapOnActivity: 2, - autoScrollSnapOnActivityOffset: 100 + autoScrollSnapOnActivityOffset: 100, + subtle: '#666' } }, webChatElement diff --git a/__tests__/html/autoScroll.snap.activityAndPage.html b/__tests__/html/autoScroll.snap.activityAndPage.html index ddc0f68537..d60eeaebdb 100644 --- a/__tests__/html/autoScroll.snap.activityAndPage.html +++ b/__tests__/html/autoScroll.snap.activityAndPage.html @@ -63,7 +63,8 @@ styleOptions: { autoScrollSnapOnActivity: true, autoScrollSnapOnPage: true, - autoScrollSnapOnPageOffset: -100 + autoScrollSnapOnPageOffset: -100, + subtle: '#666' } }, webChatElement diff --git a/__tests__/html/autoScroll.snap.default.html b/__tests__/html/autoScroll.snap.default.html index ee07b10dc4..35310c2912 100644 --- a/__tests__/html/autoScroll.snap.default.html +++ b/__tests__/html/autoScroll.snap.default.html @@ -56,7 +56,14 @@ run(async function () { const webChatElement = document.getElementById('webchat'); - WebChat.renderWebChat({ directLine, store }, webChatElement); + WebChat.renderWebChat( + { + directLine, + store, + styleOptions: { subtle: '#666' } + }, + webChatElement + ); await pageConditions.uiConnected(); diff --git a/__tests__/html/autoScroll.snap.page.html b/__tests__/html/autoScroll.snap.page.html index 72cfb2988c..5fc454e317 100644 --- a/__tests__/html/autoScroll.snap.page.html +++ b/__tests__/html/autoScroll.snap.page.html @@ -60,7 +60,10 @@ { directLine, store, - styleOptions: { autoScrollSnapOnPage: 0.2 } + styleOptions: { + autoScrollSnapOnPage: 0.2, + subtle: '#666' + } }, webChatElement ); diff --git a/__tests__/html/focusManagement.disableAdaptiveCard.manual.html b/__tests__/html/focusManagement.disableAdaptiveCard.manual.html index d938ea103b..36273e8e2b 100644 --- a/__tests__/html/focusManagement.disableAdaptiveCard.manual.html +++ b/__tests__/html/focusManagement.disableAdaptiveCard.manual.html @@ -13,7 +13,7 @@ run(async function () { const store = testHelpers.createStore(); const directLine = WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() }); - const baseProps = { directLine, store }; + const baseProps = { directLine, store, styleOptions: { subtle: '#666' } }; const webChatElement = document.getElementById('webchat'); WebChat.renderWebChat(baseProps, webChatElement); diff --git a/__tests__/html/focusManagement.disableHeroCard.obsolete.html b/__tests__/html/focusManagement.disableHeroCard.obsolete.html index f5813a3cfb..4f3b55318b 100644 --- a/__tests__/html/focusManagement.disableHeroCard.obsolete.html +++ b/__tests__/html/focusManagement.disableHeroCard.obsolete.html @@ -47,7 +47,8 @@ return next(...args); }, directLine, - store + store, + styleOptions: { subtle: '#666' } }, document.getElementById('webchat') ); diff --git a/__tests__/html/focusManagement.disableUI.html b/__tests__/html/focusManagement.disableUI.html index d9759715bc..58c7b1228e 100644 --- a/__tests__/html/focusManagement.disableUI.html +++ b/__tests__/html/focusManagement.disableUI.html @@ -13,7 +13,7 @@ run(async function () { const store = testHelpers.createStore(); const directLine = WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() }); - const baseProps = { directLine, store }; + const baseProps = { directLine, store, styleOptions: { subtle: '#666' } }; const webChatElement = document.getElementById('webchat'); WebChat.renderWebChat(baseProps, webChatElement); diff --git a/__tests__/html/focusManagement.scrollToEndButton.receiveHeroCard.html b/__tests__/html/focusManagement.scrollToEndButton.receiveHeroCard.html index bb115e1e9a..8b590333b9 100644 --- a/__tests__/html/focusManagement.scrollToEndButton.receiveHeroCard.html +++ b/__tests__/html/focusManagement.scrollToEndButton.receiveHeroCard.html @@ -17,7 +17,8 @@ WebChat.renderWebChat( { directLine, - store + store, + styleOptions: { subtle: '#666' } }, document.getElementById('webchat') ); diff --git a/__tests__/html/focusManagement.scrollToEndButton.receiveMessage.html b/__tests__/html/focusManagement.scrollToEndButton.receiveMessage.html index d19e8f051f..19cd25167d 100644 --- a/__tests__/html/focusManagement.scrollToEndButton.receiveMessage.html +++ b/__tests__/html/focusManagement.scrollToEndButton.receiveMessage.html @@ -17,7 +17,8 @@ WebChat.renderWebChat( { directLine, - store + store, + styleOptions: { subtle: '#666' } }, document.getElementById('webchat') ); diff --git a/__tests__/html/focusManagement.sendBoxTextBoxSubmit.html b/__tests__/html/focusManagement.sendBoxTextBoxSubmit.html index 21e28018a5..e76abd271d 100644 --- a/__tests__/html/focusManagement.sendBoxTextBoxSubmit.html +++ b/__tests__/html/focusManagement.sendBoxTextBoxSubmit.html @@ -17,7 +17,8 @@ WebChat.renderWebChat( { directLine, - store + store, + styleOptions: { subtle: '#666' } }, document.getElementById('webchat') ); diff --git a/__tests__/html/focusManagement.sendFailedRetry.html b/__tests__/html/focusManagement.sendFailedRetry.html index 74743ff5e8..e849ba1c01 100644 --- a/__tests__/html/focusManagement.sendFailedRetry.html +++ b/__tests__/html/focusManagement.sendFailedRetry.html @@ -31,7 +31,8 @@ window.WebChat.renderWebChat( { directLine: hackedDirectLine, - store + store, + styleOptions: { subtle: '#666' } }, document.getElementById('webchat') ); diff --git a/__tests__/html/focusManagement.suggestedActions.html b/__tests__/html/focusManagement.suggestedActions.html index a7c32e9e6d..cda849b12d 100644 --- a/__tests__/html/focusManagement.suggestedActions.html +++ b/__tests__/html/focusManagement.suggestedActions.html @@ -17,7 +17,8 @@ WebChat.renderWebChat( { directLine, - store + store, + styleOptions: { subtle: '#666' } }, document.getElementById('webchat') ); diff --git a/__tests__/html/transcript.navigation.behavior.proactive.adaptiveCard.html b/__tests__/html/transcript.navigation.behavior.proactive.adaptiveCard.html index 15d37a56b3..67395c3bbd 100644 --- a/__tests__/html/transcript.navigation.behavior.proactive.adaptiveCard.html +++ b/__tests__/html/transcript.navigation.behavior.proactive.adaptiveCard.html @@ -42,7 +42,14 @@ ]); const store = testHelpers.createStore(); - WebChat.renderWebChat({ directLine, store }, document.getElementById('webchat')); + WebChat.renderWebChat( + { + directLine, + store, + styleOptions: { subtle: '#666' } + }, + document.getElementById('webchat') + ); await pageConditions.uiConnected(); await pageConditions.numActivitiesShown(1); diff --git a/__tests__/html/transcript.navigation.behavior.proactive.message.html b/__tests__/html/transcript.navigation.behavior.proactive.message.html index b6a3a80325..00bb8a4747 100644 --- a/__tests__/html/transcript.navigation.behavior.proactive.message.html +++ b/__tests__/html/transcript.navigation.behavior.proactive.message.html @@ -36,7 +36,14 @@ ]); const store = testHelpers.createStore(); - WebChat.renderWebChat({ directLine, store }, document.getElementById('webchat')); + WebChat.renderWebChat( + { + directLine, + store, + styleOptions: { subtle: '#666' } + }, + document.getElementById('webchat') + ); await pageConditions.uiConnected(); await pageConditions.numActivitiesShown(3); diff --git a/__tests__/html/transcript.navigation.scrollIntoView.keyboard.html b/__tests__/html/transcript.navigation.scrollIntoView.keyboard.html index 6277421563..73093b3ecf 100644 --- a/__tests__/html/transcript.navigation.scrollIntoView.keyboard.html +++ b/__tests__/html/transcript.navigation.scrollIntoView.keyboard.html @@ -43,7 +43,8 @@ WebChat.renderWebChat( { directLine, - store + store, + styleOptions: { subtle: '#666' } }, document.getElementById('webchat') ); diff --git a/__tests__/html/transcript.navigation.scrollIntoView.mouse.html b/__tests__/html/transcript.navigation.scrollIntoView.mouse.html index 89a468614e..097482d936 100644 --- a/__tests__/html/transcript.navigation.scrollIntoView.mouse.html +++ b/__tests__/html/transcript.navigation.scrollIntoView.mouse.html @@ -43,7 +43,8 @@ WebChat.renderWebChat( { directLine, - store + store, + styleOptions: { subtle: '#666' } }, document.getElementById('webchat') ); diff --git a/__tests__/html/useTextBoxSubmit.main.html b/__tests__/html/useTextBoxSubmit.main.html index a73ad4016c..6a51a80516 100644 --- a/__tests__/html/useTextBoxSubmit.main.html +++ b/__tests__/html/useTextBoxSubmit.main.html @@ -20,7 +20,8 @@ const renderWebChatWithHook = testHelpers.createRenderWebChatWithHook( { directLine: WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() }), - store: testHelpers.createStore() + store: testHelpers.createStore(), + styleOptions: { subtle: '#666' } }, document.getElementById('webchat') ); diff --git a/__tests__/html/useTextBoxSubmit.sendBox.html b/__tests__/html/useTextBoxSubmit.sendBox.html index 3552d9029e..f38423fafe 100644 --- a/__tests__/html/useTextBoxSubmit.sendBox.html +++ b/__tests__/html/useTextBoxSubmit.sendBox.html @@ -23,7 +23,8 @@ { activityMiddleware: testHelpers.createRunHookActivityMiddleware(), directLine, - store + store, + styleOptions: { subtle: '#666' } }, document.getElementById('webchat') ); diff --git a/__tests__/html/useTextBoxSubmit.sendBoxWithoutKeyboard.html b/__tests__/html/useTextBoxSubmit.sendBoxWithoutKeyboard.html index 1840f09508..65814e31bf 100644 --- a/__tests__/html/useTextBoxSubmit.sendBoxWithoutKeyboard.html +++ b/__tests__/html/useTextBoxSubmit.sendBoxWithoutKeyboard.html @@ -23,7 +23,8 @@ { activityMiddleware: testHelpers.createRunHookActivityMiddleware(), directLine, - store + store, + styleOptions: { subtle: '#666' } }, document.getElementById('webchat') );