@pocketprep/ui-kit 3.4.60 → 3.4.62
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 +7 -3
- package/dist/@pocketprep/ui-kit.js.map +1 -1
- package/dist/@pocketprep/ui-kit.umd.cjs +2 -1
- package/dist/@pocketprep/ui-kit.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/lib/components/Quiz/Question/MatrixChoicesContainer.vue +4 -0
- package/lib/components/Quiz/Question.vue +7 -0
- 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 () {
|
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
|
}
|