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 36f3c90 commit 6ffbeaa
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 @@ -15,6 +15,7 @@
:style="{ borderBottomColor: !$isPrint ? $themeTokens.fineLine : 'transparent' }"
>
<KTabsList
ref="tabsList"
:tabsId="PLAN_TABS_ID"
ariaLabel="Coach plan"
:activeTabId="activeTabId"
Expand Down Expand Up @@ -75,6 +76,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 @@ -17,6 +17,7 @@
:style="{ borderBottomColor: !$isPrint ? $themeTokens.fineLine : 'transparent' }"
>
<KTabsList
ref="tabsList"
:tabsId="REPORTS_TABS_ID"
ariaLabel="Coach reports"
:activeTabId="activeTabId"
Expand Down Expand Up @@ -84,6 +85,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 6ffbeaa

Please sign in to comment.