diff --git a/CHANGELOG.md b/CHANGELOG.md index b836f46116..55360a9550 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix [#2160](https://github.com/microsoft/BotFramework-WebChat/issues/2160). Clear suggested actions after clicking on a suggested actions of type `openUrl`, by [@tdurnford](https://github.com/tdurnford) in PR [#2190](https://github.com/microsoft/BotFramework-WebChat/pull/2190) - Fix [#2187](https://github.com/microsoft/BotFramework-WebChat/issues/2187). Bump core-js and update core-js modules on index-es5.js, by [@corinagum](https://github.com/corinagum) in PR [#2195](https://github.com/microsoft/BotFramework-WebChat/pull/2195) +- Fix [#2193](https://github.com/microsoft/BotFramework-WebChat/issues/2193). Fix Adaptive Card/attachments do not get read by Narrator, by [@corinagum](https://github.com/corinagum) in PR [#XXX](https://github.com/microsoft/BotFramework-WebChat/pull/XXX) ## [4.5.0] - 2019-07-10 diff --git a/packages/bundle/src/adaptiveCards/Attachment/AdaptiveCardRenderer.js b/packages/bundle/src/adaptiveCards/Attachment/AdaptiveCardRenderer.js index d126a692f0..382afefdf7 100644 --- a/packages/bundle/src/adaptiveCards/Attachment/AdaptiveCardRenderer.js +++ b/packages/bundle/src/adaptiveCards/Attachment/AdaptiveCardRenderer.js @@ -178,7 +178,7 @@ class AdaptiveCardRenderer extends React.PureComponent {
{JSON.stringify(error, null, 2)}
) : ( -
+
); } } diff --git a/packages/component/src/Activity/Bubble.js b/packages/component/src/Activity/Bubble.js index e4c1e2ad5b..c4149f5378 100644 --- a/packages/component/src/Activity/Bubble.js +++ b/packages/component/src/Activity/Bubble.js @@ -4,21 +4,20 @@ import React from 'react'; import connectToWebChat from '../connectToWebChat'; -const Bubble = ({ 'aria-hidden': ariaHidden, children, className, fromUser, styleSet }) => ( +const Bubble = ({ ariaHidden, children, className, fromUser, styleSet }) => (
{children}
); Bubble.defaultProps = { - 'aria-hidden': true, children: undefined, className: '', fromUser: false }; Bubble.propTypes = { - 'aria-hidden': PropTypes.bool, + ariaHidden: PropTypes.bool.isRequired, children: PropTypes.any, className: PropTypes.string, fromUser: PropTypes.bool, diff --git a/packages/component/src/Activity/StackedLayout.js b/packages/component/src/Activity/StackedLayout.js index 14a9cb27c2..d96bd4030f 100644 --- a/packages/component/src/Activity/StackedLayout.js +++ b/packages/component/src/Activity/StackedLayout.js @@ -118,8 +118,9 @@ const StackedLayout = ({ activity, avatarInitials, children, language, styleSet,
) : ( !!activityDisplayText && ( -
- +
+ + {children({ activity, attachment: { @@ -133,8 +134,9 @@ const StackedLayout = ({ activity, avatarInitials, children, language, styleSet, ) )} {attachments.map((attachment, index) => ( -
- +
+ + {children({ attachment })}
@@ -143,7 +145,7 @@ const StackedLayout = ({ activity, avatarInitials, children, language, styleSet, {showSendStatus ? ( ) : ( - + )}
diff --git a/packages/component/src/Attachment/Assets/DownloadIcon.js b/packages/component/src/Attachment/Assets/DownloadIcon.js index d6e26c3e99..b546428bd5 100644 --- a/packages/component/src/Attachment/Assets/DownloadIcon.js +++ b/packages/component/src/Attachment/Assets/DownloadIcon.js @@ -3,9 +3,9 @@ import React from 'react'; const ICON_SIZE_FACTOR = 22; -const DownloadIcon = ({ className, label, size }) => ( +const DownloadIcon = ({ className, size }) => ( ( DownloadIcon.defaultProps = { className: '', - label: '', size: 1 }; DownloadIcon.propTypes = { className: PropTypes.string, - label: PropTypes.string, size: PropTypes.number }; diff --git a/packages/component/src/Attachment/Assets/TypingAnimation.js b/packages/component/src/Attachment/Assets/TypingAnimation.js index 95465d3777..467d542da6 100644 --- a/packages/component/src/Attachment/Assets/TypingAnimation.js +++ b/packages/component/src/Attachment/Assets/TypingAnimation.js @@ -3,7 +3,7 @@ import React from 'react'; import connectToWebChat from '../../connectToWebChat'; -const TypingAnimation = ({ styleSet }) =>
; +const TypingAnimation = ({ styleSet }) =>
; TypingAnimation.propTypes = { styleSet: PropTypes.shape({ diff --git a/packages/component/src/Attachment/AudioContent.js b/packages/component/src/Attachment/AudioContent.js index d2f7a739e1..bd4f92062b 100644 --- a/packages/component/src/Attachment/AudioContent.js +++ b/packages/component/src/Attachment/AudioContent.js @@ -3,17 +3,27 @@ import React from 'react'; import connectToWebChat from '../connectToWebChat'; -const AudioContent = ({ autoPlay, loop, poster, src, styleSet }) => ( -