Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
recent_topics: Wrap focusable elements around a div.
Aman Agrawal4cd7f2a32977
diff --git a/static/js/recent_topics.js b/static/js/recent_topics.jsindex 1da295769e8..f5ac563bc4b 100644--- a/static/js/recent_topics.js+++ b/static/js/recent_topics.js@@ -46,12 +46,7 @@ function set_table_focus(row, col) {return true;}- // The first two "columns" are the stream/topic links.- if (col === 0 || col === 1) {- topic_rows.eq(row).children().eq(col).find('a').focus();- } else {- topic_rows.eq(row).children().eq(2).children().eq(col - 2).focus();- }+ topic_rows.eq(row).find('.recent_topics_focusable').eq(col).children().focus();current_focus_elem = 'table';return true;}diff --git a/static/styles/recent_topics.scss b/static/styles/recent_topics.scssindex 9a9a9f759e0..4ea7f347924 100644--- a/static/styles/recent_topics.scss+++ b/static/styles/recent_topics.scss@@ -64,6 +64,10 @@padding: 3px 8px 3px 8px;}+ .recent_topics_focusable {+ display: inline-block;+ }+a {color: hsl(205, 47%, 42%);text-decoration: none;diff --git a/static/templates/recent_topic_row.hbs b/static/templates/recent_topic_row.hbsindex 2952844cfe7..7a9a05b5307 100644--- a/static/templates/recent_topic_row.hbs+++ b/static/templates/recent_topic_row.hbs@@ -3,19 +3,27 @@<span id="stream_sidebar_privacy_swatch_{{stream_id}}" class="stream-privacy filter-icon" style="color: {{stream_color}}">{{> stream_privacy }}</span>- <a href="{{stream_url}}">{{stream}}</a>+ <div class="recent_topics_focusable">+ <a href="{{stream_url}}">{{stream}}</a>+ </div></td><td class="recent_topic_name">- <a href="{{topic_url}}">{{topic}}</a>+ <div class="recent_topics_focusable">+ <a href="{{topic_url}}">{{topic}}</a>+ </div>{{#if unread_count}}<span class="recent_topic_unread_count">{{unread_count}}</span>{{/if}}</td><td class="recent_topic_actions">- {{#if topic_muted}}- <i class="fa fa-bell-slash on_hover_topic_unmute recipient_bar_icon" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" title="{{t 'Unmute topic' }}" role="button" tabindex="0" aria-label="{{t 'Mute topic' }}"></i>- {{else}}- <i class="fa fa-bell-slash on_hover_topic_mute recipient_bar_icon" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" title="{{t 'Mute topic' }}" role="button" tabindex="0" aria-label="{{t 'Mute topic' }}"></i>- {{/if}}- <i class="fa fa-check-circle on_hover_topic_read recipient_bar_icon" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" title="{{t 'Mark as read' }}" role="button" tabindex="0" aria-label="{{t 'Mark as read' }}"></i>+ <div class="recent_topics_focusable">+ {{#if topic_muted}}+ <i class="fa fa-bell-slash on_hover_topic_unmute recipient_bar_icon" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" title="{{t 'Unmute topic' }}" role="button" tabindex="0" aria-label="{{t 'Mute topic' }}"></i>+ {{else}}+ <i class="fa fa-bell-slash on_hover_topic_mute recipient_bar_icon" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" title="{{t 'Mute topic' }}" role="button" tabindex="0" aria-label="{{t 'Mute topic' }}"></i>+ {{/if}}+ </div>+ <div class="recent_topics_focusable">+ <i class="fa fa-check-circle on_hover_topic_read recipient_bar_icon" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" title="{{t 'Mark as read' }}" role="button" tabindex="0" aria-label="{{t 'Mark as read' }}"></i>+ </div></td><td class='recent_topic_users'><ul class="recent_avatars">