From a0e9fd1077a10fb1646ebfd4bb8d327dc84f606f Mon Sep 17 00:00:00 2001 From: Aaron Kc Hsu Date: Thu, 19 Jul 2018 11:16:20 -0600 Subject: [PATCH] Fix screenreader skipping blue unread dot on discussions fixes COMMS-1331 test plan * Navigate to a discussions page with blue dots on the left showing * Navigate through thepage using screenreader safari * Notice that the unread symbol is read to the SO users Change-Id: I3fe94eaa3f0454ac5dbbff0f39c86a17468de67b Reviewed-on: https://gerrit.instructure.com/158012 Reviewed-by: Steven Burnett Tested-by: Jenkins QA-Review: Sara Chadwick Product-Review: Aaron Kc Hsu --- .../discussions/components/DiscussionRow.js | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/app/jsx/discussions/components/DiscussionRow.js b/app/jsx/discussions/components/DiscussionRow.js index 0abea01411f..14750a5f164 100644 --- a/app/jsx/discussions/components/DiscussionRow.js +++ b/app/jsx/discussions/components/DiscussionRow.js @@ -684,6 +684,25 @@ export class DiscussionRow extends Component { ) } + renderBlueUnreadBadge() { + if(this.props.discussion.read_state !== "read") { + return ( + {I18n.t('Unread')}} + /> + ) + } else { + return ( + + + + ) + } + } + render () { // necessary because discussions return html from RCE const contentWrapper = document.createElement('span') @@ -695,11 +714,7 @@ export class DiscussionRow extends Component { {/* discussion topics is different for badges so we use our own read indicator instead of passing to isRead */} - {!(this.props.discussion.read_state === "read") - ? - : - - } + {this.renderBlueUnreadBadge()} {this.renderDiscussion()}