diff --git a/static/script.js b/static/script.js index ac23276..8419df8 100644 --- a/static/script.js +++ b/static/script.js @@ -347,6 +347,14 @@ if (elements.predictionResult) { elements.predictionResult.className = `prediction-result show ${type}`; + // Manage ARIA busy state for screen readers during updates + if (type === 'loading') { + elements.predictionResult.setAttribute('aria-busy', 'true'); + } else { + elements.predictionResult.setAttribute('aria-busy', 'false'); + // Move focus to result container so the live region is announced + elements.predictionResult.focus(); + } } // Handle loading state diff --git a/templates/index.html b/templates/index.html index 46c2200..8afa653 100644 --- a/templates/index.html +++ b/templates/index.html @@ -220,9 +220,9 @@

Quick Fact Checker

Try these examples:

- - - + + +
@@ -241,7 +241,7 @@

Quick Fact Checker

-
+
Quick Fact Checker
Analysis Result
-
Processing your text...
+
Processing your text...
diff --git a/templates/index_i18n.html b/templates/index_i18n.html index e066e9f..f21e7ec 100644 --- a/templates/index_i18n.html +++ b/templates/index_i18n.html @@ -118,9 +118,9 @@

Quick Fact Checker

Try these examples:

- - - + + +
@@ -140,7 +140,7 @@

Quick Fact Checker

-
+
@@ -149,7 +149,7 @@

Quick Fact Checker

Analysis Result
-
Processing your text...
+
Processing your text...