Skip to content

Commit

Permalink
Focus the active tab when tabs are mounted
Browse files Browse the repository at this point in the history
  • Loading branch information
MisRob committed Mar 3, 2023
1 parent b6667de commit 6dbbebc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kolibri/plugins/coach/assets/src/views/plan/PlanHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<p>{{ $tr('planYourClassDescription') }}</p>
<HeaderTabs :style="{ marginTop: '28px' }">
<KTabsList
ref="tabsList"
:tabsId="PLAN_TABS_ID"
ariaLabel="Coach plan"
:activeTabId="activeTabId"
Expand Down Expand Up @@ -72,6 +73,12 @@
];
},
},
mounted() {
// see https://github.com/learningequality/kolibri/issues/10113
this.$nextTick(() => {
this.$refs.tabsList.focusActiveTab();
});
},
$trs: {
planYourClassLabel: {
message: 'Plan your class',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</p>
<HeaderTabs :style="{ marginTop: '28px' }">
<KTabsList
ref="tabsList"
:tabsId="REPORTS_TABS_ID"
ariaLabel="Coach reports"
:activeTabId="activeTabId"
Expand Down Expand Up @@ -81,6 +82,12 @@
];
},
},
mounted() {
// see https://github.com/learningequality/kolibri/issues/10113
this.$nextTick(() => {
this.$refs.tabsList.focusActiveTab();
});
},
$trs: {
description: {
message: 'View reports for your learners and class materials',
Expand Down

0 comments on commit 6dbbebc

Please sign in to comment.