Skip to content

Commit c87962f

Browse files
committed
TD-4196: Fixed focus issue on my contibutions page
1 parent 8fb3447 commit c87962f

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

LearningHub.Nhs.WebUI/Scripts/vuesrc/mycontributions/gridcomponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</template>
2424
</div>
2525
<div class="load-more text-center pb-5" v-if="!this.hideLoadMore">
26-
<button class="btn btn-outline-custom" @click="loadNextRecordBatch()">{{ getLoadMoreButtonText() }}</button>
26+
<button class="nhsuk-button nhsuk-button--secondary" @click="loadNextRecordBatch()">{{ getLoadMoreButtonText() }}</button>
2727
</div>
2828

2929
</div>

LearningHub.Nhs.WebUI/Scripts/vuesrc/mycontributions/mycontributions.vue

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<a class="dropdown-toggle" href="#" role="button" id="dropdownCatalogueSelect" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
1717
Change catalogue
1818
</a>
19-
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownCatalogueSelect">
20-
<a v-for="(catalogue, index) in userCatalogues" class="dropdown-item" @click="catalogueChange(catalogue.id, catalogue.nodeId)" :tabindex="index">{{getCatalogueName(catalogue)}}</a>
19+
<div id="catalogueMenuItem" role="menu" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownCatalogueSelect">
20+
<a v-for="(catalogue, index) in userCatalogues" role="menuitem" class="dropdown-item" v-on:keyup.enter="keyboardCatalogueSelection(catalogue.id, catalogue.nodeId)" @click="catalogueChange(catalogue.id, catalogue.nodeId)" :tabindex="index">{{getCatalogueName(catalogue)}}</a>
2121
</div>
2222
</div>
2323
</div>
@@ -255,6 +255,13 @@
255255
setRestrictToCurrentUser() {
256256
this.$store.commit("myContributionsState/setRestrictToCurrentUser", this.restrictToCurrentUser);
257257
},
258+
keyboardCatalogueSelection(catalogueNodeVersionId: number, nodeId: number) {
259+
this.catalogueChange(catalogueNodeVersionId, nodeId);
260+
const dropdownMenu = document.getElementById('catalogueMenuItem');
261+
if (dropdownMenu) {
262+
dropdownMenu.classList.remove('show');
263+
}
264+
},
258265
keyboardSelection(tabIndex: number) {
259266
switch (tabIndex) {
260267
case MyContributeTabEnum.ActionRequired:
@@ -382,6 +389,13 @@
382389
margin-right: auto;
383390
}
384391
392+
a.dropdown-item:hover,
393+
a.dropdown-item:focus {
394+
background-color: $nhsuk-blue !important;
395+
color: $nhsuk-white !important;
396+
box-shadow: none !important;
397+
}
398+
385399
@media (min-width: 769px) {
386400
.border-y-grey {
387401
border-top: 1px solid $nhsuk-grey-light;

0 commit comments

Comments
 (0)