From 6f0ae8633f4bde0468e286aaaef48577009d242a Mon Sep 17 00:00:00 2001 From: Harsh <116981900+reharsh@users.noreply.github.com> Date: Fri, 28 Mar 2025 08:34:27 +0530 Subject: [PATCH] left_sidebar: Fix Enter key behavior on "Show all topics" link. This commits adds href attribute so that pressing down Enter key works on the anchor element and also makes the focus styling same topic names. --- web/styles/left_sidebar.css | 18 +++++++++++++++++- web/templates/more_topics.hbs | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.css index 8145b12202..2b60b1629c 100644 --- a/web/styles/left_sidebar.css +++ b/web/styles/left_sidebar.css @@ -425,7 +425,8 @@ #direct-messages-list .bottom_left_row { a.stream-name:focus, a.sidebar-topic-name:focus, - a.conversation-partners:focus { + a.conversation-partners:focus, + a.sidebar-topic-action-heading:focus { outline: none; text-decoration: none; } @@ -522,6 +523,12 @@ ul.filters { } } + .sidebar-topic-action-heading { + &:focus { + color: var(--color-text-sidebar-action-heading); + } + } + & hr { margin-top: 10px; margin-bottom: 10px; @@ -1499,6 +1506,15 @@ li.top_left_scheduled_messages { width: 18px; } +#stream_filters + .narrow-filter + .topic-list + .bottom_left_row:has(a.sidebar-topic-action-heading:focus-visible) { + outline: 2px solid var(--color-outline-focus); + outline-offset: -2px; + background-color: var(--color-background-hover-narrow-filter); +} + /* The grouping border should not be shown on zoomed-in views. */ .zoom-in .topic-list.topic-list-has-topics::before, diff --git a/web/templates/more_topics.hbs b/web/templates/more_topics.hbs index e51d581912..155f79eaf8 100644 --- a/web/templates/more_topics.hbs +++ b/web/templates/more_topics.hbs @@ -2,7 +2,7 @@ {{#unless more_topics_unreads}}zero-topic-unreads{{/unless}} {{#if more_topics_unread_count_muted}}more_topic_unreads_muted_only{{/if}}">