Commit 0a3ebf6a by Your Name Committed by Kevin Chugh

update discussion forums views to add accessibility information and add hidden…

update discussion forums views to add accessibility information and add hidden accessibilty class to discussion scss, this comprises adding comments count and votes count verbiage and vote call to action
parent 89c94b4f
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="group-visibility-label">${_("This post visible only to group {group}.").format(group=cohort_dictionary[thread['group_id']])} </div> <div class="group-visibility-label">${_("This post visible only to group {group}.").format(group=cohort_dictionary[thread['group_id']])} </div>
%endif %endif
<a href="#" class="vote-btn discussion-vote discussion-vote-up"><span class="plus-icon">+</span> <span class='votes-count-number'>${thread['votes']['up_count']}</span></a> <a href="#" class="vote-btn discussion-vote discussion-vote-up"><span class="plus-icon">+</span> <span class='votes-count-number'>${thread['votes']['up_count']}<span class="sr">votes (click to vote)</span></span></a>
<h1>${thread['title']}</h1> <h1>${thread['title']}</h1>
<p class="posted-details"> <p class="posted-details">
<span class="timeago" title="${thread['created_at'] | h}">sometime</span> by <span class="timeago" title="${thread['created_at'] | h}">sometime</span> by
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
${"<% } %>"} ${"<% } %>"}
<a href="#" class="vote-btn discussion-vote discussion-vote-up" data-role="discussion-vote" data-tooltip="vote"> <a href="#" class="vote-btn discussion-vote discussion-vote-up" data-role="discussion-vote" data-tooltip="vote">
<span class="plus-icon">+</span> <span class='votes-count-number'>${'<%- votes["up_count"] %>'}</span></a> <span class="plus-icon">+</span> <span class='votes-count-number'>${'<%- votes["up_count"] %>'}<span class="sr">votes (click to vote)</span></span></a>
<h1>${'<%- title %>'}</h1> <h1>${'<%- title %>'}</h1>
<p class="posted-details"> <p class="posted-details">
${"<% if (obj.username) { %>"} ${"<% if (obj.username) { %>"}
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
<script type="text/template" id="thread-response-show-template"> <script type="text/template" id="thread-response-show-template">
<header class="response-local"> <header class="response-local">
<a href="javascript:void(0)" class="vote-btn" data-tooltip="vote"><span class="plus-icon"></span><span class="votes-count-number">${"<%- votes['up_count'] %>"}</span></a> <a href="javascript:void(0)" class="vote-btn" data-tooltip="vote"><span class="plus-icon"></span><span class="votes-count-number">${"<%- votes['up_count'] %>"}<span class="sr">votes (click to vote)</span></span></a>
<a href="javascript:void(0)" class="endorse-btn${'<% if (endorsed) { %> is-endorsed<% } %>'} action-endorse" style="cursor: default; display: none;" data-tooltip="endorse"><span class="check-icon" style="pointer-events: none; "></span></a> <a href="javascript:void(0)" class="endorse-btn${'<% if (endorsed) { %> is-endorsed<% } %>'} action-endorse" style="cursor: default; display: none;" data-tooltip="endorse"><span class="check-icon" style="pointer-events: none; "></span></a>
${"<% if (obj.username) { %>"} ${"<% if (obj.username) { %>"}
<a href="${'<%- user_url %>'}" class="posted-by">${'<%- username %>'}</a> <a href="${'<%- user_url %>'}" class="posted-by">${'<%- username %>'}</a>
...@@ -165,11 +165,11 @@ ...@@ -165,11 +165,11 @@
<a href="${'<%- id %>'}" data-id="${'<%- id %>'}"> <a href="${'<%- id %>'}" data-id="${'<%- id %>'}">
<span class="title">${"<%- title %>"}</span> <span class="title">${"<%- title %>"}</span>
${"<% if (unread_comments_count > 0) { %>"} ${"<% if (unread_comments_count > 0) { %>"}
<span class="comments-count unread" data-tooltip="${"<%- unread_comments_count %>"} new comment${"<%- unread_comments_count > 1 ? 's' : '' %>"}">${"<%- comments_count %>"}</span> <span class="comments-count unread" data-tooltip="${"<%- unread_comments_count %>"} new comment${"<%- unread_comments_count > 1 ? 's' : '' %>"}">${"<%- comments_count %>"} <span class="sr">comments</span></span>
${"<% } else { %>"} ${"<% } else { %>"}
<span class="comments-count">${"<%- comments_count %>"}</span> <span class="comments-count">${"<%- comments_count %>"}<span class="sr">comments</span></span>
${"<% } %>"} ${"<% } %>"}
<span class="votes-count">+${"<%- votes['up_count'] %>"}</span> <span class="votes-count">+${"<%- votes['up_count'] %>"}<span class="sr">votes</span></span>
</a> </a>
</script> </script>
<script type="text/template" id="discussion-home"> <script type="text/template" id="discussion-home">
......
...@@ -3,7 +3,7 @@ CONTENT MUSTACHE ...@@ -3,7 +3,7 @@ CONTENT MUSTACHE
<div class="discussion-content-wrapper"> <div class="discussion-content-wrapper">
<div class="discussion-votes"> <div class="discussion-votes">
<a class="discussion-vote discussion-vote-up" href="javascript:void(0)" value="up">&#9650;</a> <a class="discussion-vote discussion-vote-up" href="javascript:void(0)" value="up">&#9650;</a>
<div class="discussion-votes-point">{{content.votes.point}}</div> <div class="discussion-votes-point">{{content.votes.point}}<span class="sr">votes (click to vote)</span></div>
<a class="discussion-vote discussion-vote-down" href="javascript:void(0)" value="down">&#9660;</a> <a class="discussion-vote discussion-vote-down" href="javascript:void(0)" value="down">&#9660;</a>
</div> </div>
<div class="discussion-right-wrapper"> <div class="discussion-right-wrapper">
......
<div class="discussion-post local"> <div class="discussion-post local">
<div><a href="javascript:void(0)" class="dogear action-follow" data-tooltip="follow"></a></div> <div><a href="javascript:void(0)" class="dogear action-follow" data-tooltip="follow"></a></div>
<header> <header>
<a href="#" class="vote-btn discussion-vote discussion-vote-up" data-role="discussion-vote" data-tooltip="vote"><span class="plus-icon">+</span> <span class='votes-count-number'>{{votes.up_count}}</span></a> <a href="#" class="vote-btn discussion-vote discussion-vote-up" data-role="discussion-vote" data-tooltip="vote"><span class="plus-icon">+</span> <span class='votes-count-number'>{{votes.up_count}}</span><span class="sr">votes (click to vote)</span></a>
<h3>{{title}}</h3> <h3>{{title}}</h3>
<div class="discussion-flag-abuse notflagged" data-role="thread-flag" data-tooltip="Report Misuse"> <div class="discussion-flag-abuse notflagged" data-role="thread-flag" data-tooltip="Report Misuse">
<i class="icon icon-flag"></i><span class="flag-label">Flagged</span></div> <i class="icon icon-flag"></i><span class="flag-label">Flagged</span></div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="local"><a href="javascript:void(0)" class="dogear action-follow"></a></div> <div class="local"><a href="javascript:void(0)" class="dogear action-follow"></a></div>
<div class="discussion-post local"> <div class="discussion-post local">
<header> <header>
<a href="#" class="vote-btn discussion-vote discussion-vote-up" data-role="discussion-vote"><span class="plus-icon">+</span> <span class='votes-count-number'>{{votes.up_count}}</span></a> <a href="#" class="vote-btn discussion-vote discussion-vote-up" data-role="discussion-vote"><span class="plus-icon">+</span> <span class='votes-count-number'>{{votes.up_count}}</span><span class="sr">votes (click to vote)</span></a>
<h3>{{title}}</h3> <h3>{{title}}</h3>
<p class="posted-details"> <p class="posted-details">
{{#user}} {{#user}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment