Commit 4837b6eb by Sven Marnach Committed by Alex Dusenbery

Link "Topic Area" dropdown to the visibility message via aria-describedby.

parent 49a13216
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
}; };
NewPostView.prototype.updateVisibilityMessage = function($target, forceDivided) { NewPostView.prototype.updateVisibilityMessage = function($target, forceDivided) {
var $visEl = $('.group-visibility .field-label-text'); var $visEl = $('#wrapper-visibility-message');
var visTemplate = edx.HtmlUtils.template($('#new-post-visibility-template').html()); var visTemplate = edx.HtmlUtils.template($('#new-post-visibility-template').html());
var groupName = null; var groupName = null;
if (($target && $target.data('divided')) || forceDivided) { if (($target && $target.data('divided')) || forceDivided) {
......
...@@ -30,12 +30,7 @@ ...@@ -30,12 +30,7 @@
</label> </label>
</div> </div>
<% } else if (is_discussion_division_enabled) { %> <% } else if (is_discussion_division_enabled) { %>
<div class="post-field group-visibility"> <div class="post-field group-visibility" id="wrapper-visibility-message"></div>
<label class="field-label">
<!-- Wrapper for the visibility message filled out by a separate template -->
<span class="field-label-text"></span>
</label>
</div>
<% } %> <% } %>
<div class="post-field"> <div class="post-field">
<label class="field-label"> <label class="field-label">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<%- gettext("Add your post to a relevant topic to help others find it. (Required)") %> <%- gettext("Add your post to a relevant topic to help others find it. (Required)") %>
</div> </div>
<div class="field-input"> <div class="field-input">
<select class="post-topic field-input" aria-describedby="field_help_topic_area" required> <select class="post-topic field-input" aria-describedby="field_help_topic_area wrapper-visibility-message" required>
<%= edx.HtmlUtils.ensureHtml(topics_html) %> <%= edx.HtmlUtils.ensureHtml(topics_html) %>
</select> </select>
</div> </div>
......
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