Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

a11y: add proper ARIA roles to notification patterns (#3161)

LearningCircuit67b3e450e355
diff --git a/src/local_deep_research/web/static/js/components/progress.js b/src/local_deep_research/web/static/js/components/progress.js
index cd2a638c0d..10efc2f1ca 100644
--- a/src/local_deep_research/web/static/js/components/progress.js
+++ b/src/local_deep_research/web/static/js/components/progress.js
@@ -825,6 +825,8 @@
notificationContainer.style.right = '20px';
notificationContainer.style.zIndex = '9999';
notificationContainer.style.width = '350px';
+ notificationContainer.setAttribute('aria-live', 'polite');
+ notificationContainer.setAttribute('aria-atomic', 'true');
document.body.appendChild(notificationContainer);
}
@@ -844,6 +846,13 @@
notificationEl.classList.add('ldr-alert-info');
}
+ // Errors get assertive alert role for screen readers
+ if (type === 'error' || type === 'warning') {
+ notificationEl.setAttribute('role', 'alert');
+ } else {
+ notificationEl.setAttribute('role', 'status');
+ }
+
const strong = document.createElement('strong');
strong.textContent = title;
diff --git a/src/local_deep_research/web/static/js/embedding_settings.js b/src/local_deep_research/web/static/js/embedding_settings.js
index 008a7a1981..c7490e3e05 100644
--- a/src/local_deep_research/web/static/js/embedding_settings.js
+++ b/src/local_deep_research/web/static/js/embedding_settings.js
@@ -928,12 +928,12 @@ function showInfo(message) {
const container = document.querySelector('.ldr-library-container');
container.insertBefore(alertDiv, container.firstChild);
- // Auto-remove after 3 seconds
+ // Auto-remove after 5 seconds
setTimeout(() => {
if (alertDiv.parentNode) {
alertDiv.parentNode.removeChild(alertDiv);
}
- }, 3000);
+ }, 5000);
}
/**
diff --git a/src/local_deep_research/web/templates/pages/results.html b/src/local_deep_research/web/templates/pages/results.html
index 614272e458..09065c82e5 100644
--- a/src/local_deep_research/web/templates/pages/results.html
+++ b/src/local_deep_research/web/templates/pages/results.html
@@ -138,8 +138,8 @@
<!-- Collection items will be populated here -->
</div>
</div>
- <div id="collection-error" class="alert alert-danger" style="display: none;"></div>
- <div id="collection-success" class="alert alert-success" style="display: none;"></div>
+ <div id="collection-error" class="alert alert-danger" role="alert" aria-live="assertive" style="display: none;"></div>
+ <div id="collection-success" class="alert alert-success" role="status" aria-live="polite" style="display: none;"></div>
</div>
</div>
</div>
diff --git a/src/local_deep_research/web/templates/settings_dashboard.html b/src/local_deep_research/web/templates/settings_dashboard.html
index 6448678d7d..82ac395d8e 100644
--- a/src/local_deep_research/web/templates/settings_dashboard.html
+++ b/src/local_deep_research/web/templates/settings_dashboard.html
@@ -68,7 +68,7 @@
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
- <div class="ldr-alert ldr-alert-{{ category }}">
+ <div class="ldr-alert ldr-alert-{{ category }}" role="{{ 'alert' if category in ('error', 'warning') else 'status' }}">
<i aria-hidden="true" class="fas {% if category == 'success' %}fa-check-circle{% else %}fa-exclamation-circle{% endif %}"></i> {{ message }}
</div>
{% endfor %}