Skip to content

Commit

Permalink
Merge branch 'main' into feat-html-test-accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
compulim authored Mar 29, 2023
2 parents 16e78a1 + 7c84458 commit 265351a
Show file tree
Hide file tree
Showing 268 changed files with 334 additions and 291 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Resolved [#4643](https://github.com/microsoft/BotFramework-WebChat/issues/4643). Decoupling `botframework-directlinejs` from business logic of Web Chat for better tree-shaking, by [@compulim](https://github.com/compulim), in PR [#4645](https://github.com/microsoft/BotFramework-WebChat/pull/4645) and PR [#4648](https://github.com/microsoft/BotFramework-WebChat/pull/4648)
- 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: using `<main>` for the root container, by [@compulim](https://github.com/compulim), in PR [#4684](https://github.com/microsoft/BotFramework-WebChat/pull/4684)
- HTML test: fix accessibility issues on HTML file, by [@compulim](https://github.com/compulim), in PR [#4685](https://github.com/microsoft/BotFramework-WebChat/pull/4685)
- 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)

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.accessibleName.simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.adaptiveCard.ariaPushed.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
function createActivity(text) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<script crossorigin="anonymous" src="https://unpkg.com/react@18.1.0/umd/react.production.min.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<script crossorigin="anonymous" src="https://unpkg.com/react@18.1.0/umd/react.production.min.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
const store = testHelpers.createStore();
let directLine;
Expand Down
4 changes: 2 additions & 2 deletions __tests__/html/accessibility.adaptiveCard.withTapAction.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
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);
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.aria-roledescription.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.attachment.aria.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
// This test is to make sure we don't regress issue #3431, a race condition:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
WebChat.renderWebChat(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const clock = lolex.install();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const clock = lolex.install();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const clock = lolex.install();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.heroCard.heading.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.keyboardHelp.ariaLabel.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.keyboardHelp.clickThru.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.keyboardHelp.darkTheme.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.keyboardHelp.escapeKey.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
// SETUP: Browser window size with height of 480px.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
// SETUP: Browser window size with height of 480px.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.keyboardHelp.tabKey.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.keyboardHelp.zeroHeight.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
// SETUP: Browser window size with height of 42px.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.landmarkRole.invalid.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.landmarkRole.valid.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
WebChat.renderWebChat(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<script crossorigin="anonymous" src="https://unpkg.com/markdown-it@12.0.6/dist/markdown-it.min.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const baseActivity = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<script crossorigin="anonymous" src="https://unpkg.com/react-dom@16.8.6/umd/react-dom.production.min.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const baseActivity = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const timestamp = new Date(2000, 0, 1, 12, 34, 56, 789).toISOString();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.liveRegionActivity.text.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
await host.windowSize(360, 800, document.getElementById('webchat'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script type="text/babel" data-presets="env,stage-3,react">
const {
React: { useEffect },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script type="text/babel" data-presets="env,stage-3,react">
const {
React: { useEffect },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script type="text/babel" data-presets="env,stage-3,react">
const {
React: { useEffect },
Expand Down
Loading

0 comments on commit 265351a

Please sign in to comment.