Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Added missing accessibility attributes on search results progress bar.
luccioman45346c1be8f1
diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.jsindex 6a6abf1e4..6f91c3eb9 100644--- a/htroot/js/yacysearch.js+++ b/htroot/js/yacysearch.js@@ -37,6 +37,8 @@ function addHover() {function fadeOutBar() {document.getElementById("progressbar").setAttribute('style',"transition:transform 0s;-webkit-transition:-webkit-transform 0s;backgroundColor:transparent;");+ /* Also ensure the accessibility property for progress current value is set to 100% */+ document.getElementById("progressbar").setAttribute("aria-valuenow", 100);}/**@@ -111,6 +113,7 @@ function statistics(offset, itemscount, itemsperpage, totalcount, localResourceSif (totalcountIntValue == 0) {return;}+ var progresseBarElement = document.getElementById("progressbar");if (offsetIntValue >= 0) document.getElementById("offset").innerHTML = offset;if (offsetIntValue >= 0) document.getElementById("startRecord").setAttribute('value', offsetIntValue - 1);if (itemscountIntValue >= 0) document.getElementById("itemscount").firstChild.nodeValue = itemscount;@@ -121,14 +124,16 @@ function statistics(offset, itemscount, itemsperpage, totalcount, localResourceSif (document.getElementById("remotePeerCount") != null) document.getElementById("remotePeerCount").firstChild.nodeValue = remotePeerCount;// compose page navigation- if (document.getElementById("progressbar").getAttribute('class') != "progress-bar progress-bar-success") {+ if (progresseBarElement.getAttribute('class') != "progress-bar progress-bar-success") {var percent = 100 * (itemscountIntValue - offsetIntValue + 1) / itemsperpageIntValue;if (percent == 100) {- document.getElementById("progressbar").setAttribute('style',"transition:transform 0s;-webkit-transition:-webkit-transform 0s;");- document.getElementById("progressbar").setAttribute('class',"progress-bar progress-bar-success");+ progresseBarElement.setAttribute('style',"transition:transform 0s;-webkit-transition:-webkit-transform 0s;");+ progresseBarElement.setAttribute('class',"progress-bar progress-bar-success");window.setTimeout(fadeOutBar, 500);+ } else {+ progresseBarElement.setAttribute('aria-valuenow', percent);}- document.getElementById("progressbar").setAttribute('style',"width:" + percent + "%");+ progresseBarElement.setAttribute('style',"width:" + percent + "%");}var resnavElement = document.getElementById("resNav");if (resnavElement != null) {diff --git a/htroot/yacysearch.html b/htroot/yacysearch.htmlindex b5483f4c8..150e50519 100644--- a/htroot/yacysearch.html+++ b/htroot/yacysearch.html@@ -124,7 +124,7 @@ Use the RSS search result format to add static searches to your RSS reader, if y::<div id="results"></div><div class="progress">- <div class="progress-bar progress-bar-info" id="progressbar" role="progressbar" style="width:0%;">+ <div class="progress-bar progress-bar-info" id="progressbar" role="progressbar" aria-valuemin="0" aria-valuemax="100" style="width:0%;"><span style="position:absolute;display:block;text-align:left;width:100%;color:black;"> <strong id="offset">#[offset]#</strong>-<strong id="itemscount">#[itemscount]#</strong> of <strong id="totalcount">#[totalcount]#</strong> #(globalresults)#::; (<strong id="localResourceSize">#[localResourceSize]#</strong> local, <strong id="remoteResourceSize">#[remoteResourceSize]#</strong> remote), <strong id="remoteIndexCount">#[remoteIndexCount]#</strong> from <strong id="remotePeerCount">#[remotePeerCount]#</strong> remote YaCy peers.#(/globalresults)# <span id="feedingStatus" style="visibility: hidden;" class="glyphicon glyphicon-transfer" title="YaCy server is fetching results from available data sources."></span></span></div></div>