@pocketprep/ui-kit 3.4.61 → 3.4.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@pocketprep/ui-kit.js +11 -4
- package/dist/@pocketprep/ui-kit.js.map +1 -1
- package/dist/@pocketprep/ui-kit.umd.cjs +3 -2
- package/dist/@pocketprep/ui-kit.umd.cjs.map +1 -1
- package/lib/components/Quiz/Question.vue +7 -0
- package/lib/components/Tables/Table.vue +8 -2
- package/lib/utils.ts +3 -1
- package/package.json +1 -1
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
ref="prompt"
|
|
76
76
|
v-breakpoint:questionEl="breakpoints"
|
|
77
77
|
tabindex="-1"
|
|
78
|
+
role="group"
|
|
78
79
|
class="uikit-question__prompt"
|
|
79
80
|
:class="{
|
|
80
81
|
'uikit-question__prompt--passage-and-image': question.passage || passageImageUrl,
|
|
@@ -876,6 +877,12 @@ export default class Question extends Vue {
|
|
|
876
877
|
column: this.showNamesColumns[0] || null,
|
|
877
878
|
direction: 1,
|
|
878
879
|
}
|
|
880
|
+
|
|
881
|
+
const prompt = this.$refs['prompt'] as HTMLElement
|
|
882
|
+
const promptElements = prompt?.querySelectorAll('p')
|
|
883
|
+
if (promptElements.length) {
|
|
884
|
+
promptElements.forEach(el => el.setAttribute('tabindex', '0'))
|
|
885
|
+
}
|
|
879
886
|
}
|
|
880
887
|
|
|
881
888
|
beforeUnmount () {
|
|
@@ -336,8 +336,14 @@ export default class Table extends Vue {
|
|
|
336
336
|
|
|
337
337
|
@Watch('defaultSort')
|
|
338
338
|
defaultSortChanged () {
|
|
339
|
-
if (this.defaultSort) {
|
|
340
|
-
|
|
339
|
+
if (!this.defaultSort) {
|
|
340
|
+
return
|
|
341
|
+
}
|
|
342
|
+
const defaultSort = JSON.stringify(this.defaultSort)
|
|
343
|
+
const currentSort = JSON.stringify(this.currentSort)
|
|
344
|
+
|
|
345
|
+
if (defaultSort !== currentSort) {
|
|
346
|
+
this.currentSort = JSON.parse(defaultSort)
|
|
341
347
|
this.emitSort()
|
|
342
348
|
}
|
|
343
349
|
}
|
package/lib/utils.ts
CHANGED
|
@@ -84,7 +84,9 @@ export const highlightKeywordsInText = (params: {
|
|
|
84
84
|
regex,
|
|
85
85
|
`$1<span class="keyword-highlight${params.isDarkMode
|
|
86
86
|
? ' keyword-highlight--dark' : ''}" data-location="${
|
|
87
|
-
params.location}""
|
|
87
|
+
params.location}" role="button" tabindex="0" aria-label="${
|
|
88
|
+
word}, Instruction. Click for definition" aria-haspopup="dialog" aria-expanded="false">
|
|
89
|
+
<span style="pointer-events: none;">$2</span></span>$3`
|
|
88
90
|
)
|
|
89
91
|
}, params.text)
|
|
90
92
|
}
|