Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

docs: Restore link focus outline in sidebar.

Gittenburgccaab2d4718c
diff --git a/static/js/portico/help.js b/static/js/portico/help.js
index bbe7cefbc73..0bfea5a2053 100644
--- a/static/js/portico/help.js
+++ b/static/js/portico/help.js
@@ -20,6 +20,7 @@ function registerCodeSection($codeSection) {
function highlight_current_article() {
$(".help .sidebar a").removeClass("highlighted");
+ $(".help .sidebar a").attr("tabindex", "0");
const path = window.location.pathname;
if (!path) {
@@ -37,6 +38,7 @@ function highlight_current_article() {
// Highlight current article link and the heading of the same
article.closest("ul").css("display", "block");
article.addClass("highlighted");
+ article.attr("tabindex", "-1");
}
function render_code_sections() {
diff --git a/static/styles/portico/portico.scss b/static/styles/portico/portico.scss
index 25e43933ce1..051eeb30a5d 100644
--- a/static/styles/portico/portico.scss
+++ b/static/styles/portico/portico.scss
@@ -254,13 +254,9 @@ html {
width: calc(100% + 20px);
margin-left: -40px;
padding-left: 40px;
- }
- &:active,
- &:hover,
- &:focus,
- &:visited {
- outline: none;
+ // Don't show the focus outline for the highlighted page.
+ outline: 0;
}
}
}