From 7c84458953caa47f69c9197637a2409e4b9ec944 Mon Sep 17 00:00:00 2001 From: William Wong Date: Tue, 28 Mar 2023 16:05:45 -0700 Subject: [PATCH] Change subtle color (#4686) --- 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 79c54b0adb..2761cd6e47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,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 47a4ee407a..67174629ba 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 df36da81a2..b8d5da45f2 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 3513db824c..3cfab10a11 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 3510c2a543..f508ff415b 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 7c369e2a6f..060a11ddc5 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 76abb4e8ae..a93f409a91 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 71f167cfd7..94238c1adb 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 3272adc8a5..b9e8fea2dd 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 38ce45eacb..2b7a7ab3e5 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 87a82b2c92..9f8ec98ede 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 73d6cc4695..8206906459 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 c5766d9178..10d49f8d2a 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 b8b34d96dd..556bc7fc9f 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 65358a5562..577ab18f57 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 1757c69c96..d94a8476f5 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 cc54f7bc72..23ea32b5ff 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 f9ebfb6805..a768e0677b 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 321917e455..11c61aa9dc 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 3a75857a5d..fbb5f9cced 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 8e20af6ba1..fa3f6c4ff8 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 9470e5eac1..03132cec66 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 d793bac012..d88b3369e3 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 e7b8f6029e..5574a729d4 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') );