Commit c1cbeaec by Greg Price

Merge pull request #1321 from edx/gprice/forum-loading-a11y

Add accessible text to forum loading animations
parents 11142c7c 1187e718
...@@ -3,7 +3,7 @@ $ -> ...@@ -3,7 +3,7 @@ $ ->
window.$$contents = {} window.$$contents = {}
$.fn.extend $.fn.extend
loading: -> loading: ->
@$_loading = $("<div class='loading-animation'></div>") @$_loading = $("<div class='loading-animation'><span class='sr'>Loading content</span></div>")
$(this).after(@$_loading) $(this).after(@$_loading)
loaded: -> loaded: ->
@$_loading.remove() @$_loading.remove()
......
...@@ -124,7 +124,7 @@ if Backbone? ...@@ -124,7 +124,7 @@ if Backbone?
loadMorePages: (event) -> loadMorePages: (event) ->
if event if event
event.preventDefault() event.preventDefault()
@$(".more-pages").html('<div class="loading-animation"></div>') @$(".more-pages").html('<div class="loading-animation"><span class="sr">Loading more threads</span></div>')
@$(".more-pages").addClass("loading") @$(".more-pages").addClass("loading")
options = {} options = {}
switch @mode switch @mode
...@@ -405,7 +405,7 @@ if Backbone? ...@@ -405,7 +405,7 @@ if Backbone?
type: "GET" type: "GET"
$loading: $ $loading: $
loadingCallback: => loadingCallback: =>
@$(".post-list").html('<li class="loading"><div class="loading-animation"></div></li>') @$(".post-list").html('<li class="loading"><div class="loading-animation"><span class="sr">Loading thread list</span></div></li>')
loadedCallback: => loadedCallback: =>
if callback if callback
callback.apply @, [value] callback.apply @, [value]
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="thread-content-wrapper"></div> <div class="thread-content-wrapper"></div>
<ol class="responses"> <ol class="responses">
<li class="loading"><div class="loading-animation"></div></li> <li class="loading"><div class="loading-animation"><span class="sr">Loading content</span></div></li>
</ol> </ol>
<div class="post-status-closed bottom-post-status" style="display: none"> <div class="post-status-closed bottom-post-status" style="display: none">
${_("This thread is closed.")} ${_("This thread is closed.")}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="thread-content-wrapper"></div> <div class="thread-content-wrapper"></div>
<ol class="responses post-extended-content"> <ol class="responses post-extended-content">
<li class="loading"><div class="loading-animation"></div></li> <li class="loading"><div class="loading-animation"><span class="sr">Loading content</span></div></li>
</ol> </ol>
<form class="local discussion-reply-new post-extended-content" data-id="{{id}}"> <form class="local discussion-reply-new post-extended-content" data-id="{{id}}">
<h4>Post a response:</h4> <h4>Post a response:</h4>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="thread-content-wrapper"></div> <div class="thread-content-wrapper"></div>
<ol class="responses post-extended-content"> <ol class="responses post-extended-content">
<li class="loading"><div class="loading-animation"></div></li> <li class="loading"><div class="loading-animation"><span class="sr">Loading content</span></div></li>
</ol> </ol>
<form class="local discussion-reply-new post-extended-content" data-id="{{id}}"> <form class="local discussion-reply-new post-extended-content" data-id="{{id}}">
<h4>Post a response:</h4> <h4>Post a response:</h4>
......
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