@pie-qti/item-player 0.1.1 → 0.1.5
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/README.md +22 -19
- package/dist/catalog/applyGlossaryTriggers.d.ts +15 -0
- package/dist/catalog/applyGlossaryTriggers.d.ts.map +1 -0
- package/dist/catalog/applyGlossaryTriggers.js +193 -0
- package/dist/catalog/catalogExtractor.d.ts +18 -0
- package/dist/catalog/catalogExtractor.d.ts.map +1 -0
- package/dist/catalog/catalogExtractor.js +114 -0
- package/dist/catalog/catalogLookup.d.ts +18 -0
- package/dist/catalog/catalogLookup.d.ts.map +1 -0
- package/dist/catalog/catalogLookup.js +44 -0
- package/dist/catalog/glossaryAction.d.ts +17 -0
- package/dist/catalog/glossaryAction.d.ts.map +1 -0
- package/dist/catalog/glossaryAction.js +21 -0
- package/dist/catalog/types.d.ts +26 -0
- package/dist/catalog/types.d.ts.map +1 -0
- package/dist/catalog/types.js +6 -0
- package/dist/components/actions/typesetAction.d.ts +24 -0
- package/dist/components/actions/typesetAction.d.ts.map +1 -0
- package/dist/components/actions/typesetAction.js +59 -0
- package/dist/components/utils/assignProps.d.ts +2 -0
- package/dist/components/utils/assignProps.d.ts.map +1 -0
- package/dist/components/utils/assignProps.js +1 -0
- package/dist/components/utils/feedbackUtils.d.ts +73 -0
- package/dist/components/utils/feedbackUtils.d.ts.map +1 -0
- package/dist/components/utils/feedbackUtils.js +93 -0
- package/dist/components/utils/index.d.ts +6 -0
- package/dist/components/utils/index.d.ts.map +1 -0
- package/dist/components/utils/index.js +5 -0
- package/dist/core/ComponentRegistry.d.ts +128 -0
- package/dist/core/ComponentRegistry.d.ts.map +1 -0
- package/dist/core/ComponentRegistry.js +137 -0
- package/dist/core/ItemRenderer.d.ts +91 -0
- package/dist/core/ItemRenderer.d.ts.map +1 -0
- package/dist/core/ItemRenderer.js +261 -0
- package/dist/core/Player.d.ts +195 -0
- package/dist/core/Player.d.ts.map +1 -0
- package/dist/core/Player.js +1235 -0
- package/dist/core/Plugin.d.ts +105 -0
- package/dist/core/Plugin.d.ts.map +1 -0
- package/dist/core/Plugin.js +7 -0
- package/dist/core/PluginManager.d.ts +56 -0
- package/dist/core/PluginManager.d.ts.map +1 -0
- package/dist/core/PluginManager.js +147 -0
- package/dist/core/constants.d.ts +68 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +106 -0
- package/dist/core/declarations.d.ts +45 -0
- package/dist/core/declarations.d.ts.map +1 -0
- package/dist/core/declarations.js +133 -0
- package/dist/core/parsingLimits.d.ts +12 -0
- package/dist/core/parsingLimits.d.ts.map +1 -0
- package/dist/core/parsingLimits.js +45 -0
- package/dist/core/random.d.ts +12 -0
- package/dist/core/random.d.ts.map +1 -0
- package/dist/core/random.js +21 -0
- package/dist/core/rolePolicy.d.ts +16 -0
- package/dist/core/rolePolicy.d.ts.map +1 -0
- package/dist/core/rolePolicy.js +15 -0
- package/dist/core/sanitizer.d.ts +34 -0
- package/dist/core/sanitizer.d.ts.map +1 -0
- package/dist/core/sanitizer.js +198 -0
- package/dist/core/trustedTypes.d.ts +16 -0
- package/dist/core/trustedTypes.d.ts.map +1 -0
- package/dist/core/trustedTypes.js +55 -0
- package/dist/core/urlPolicy.d.ts +8 -0
- package/dist/core/urlPolicy.d.ts.map +1 -0
- package/dist/core/urlPolicy.js +90 -0
- package/dist/element.d.ts +22 -0
- package/dist/element.js +5327 -0
- package/dist/element.js.map +1 -0
- package/dist/extensions/MathLiveEditor.d.ts +32 -0
- package/dist/extensions/MathLiveEditor.d.ts.map +1 -0
- package/dist/extensions/MathLiveEditor.js +249 -0
- package/dist/extraction/ExtractionRegistry.d.ts +112 -0
- package/dist/extraction/ExtractionRegistry.d.ts.map +1 -0
- package/dist/extraction/ExtractionRegistry.js +260 -0
- package/dist/extraction/createContext.d.ts +30 -0
- package/dist/extraction/createContext.d.ts.map +1 -0
- package/dist/extraction/createContext.js +39 -0
- package/dist/extraction/extractors/associateExtractor.d.ts +29 -0
- package/dist/extraction/extractors/associateExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/associateExtractor.js +97 -0
- package/dist/extraction/extractors/choiceExtractor.d.ts +27 -0
- package/dist/extraction/extractors/choiceExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/choiceExtractor.js +93 -0
- package/dist/extraction/extractors/customExtractor.d.ts +20 -0
- package/dist/extraction/extractors/customExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/customExtractor.js +51 -0
- package/dist/extraction/extractors/drawingExtractor.d.ts +30 -0
- package/dist/extraction/extractors/drawingExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/drawingExtractor.js +78 -0
- package/dist/extraction/extractors/endAttemptExtractor.d.ts +20 -0
- package/dist/extraction/extractors/endAttemptExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/endAttemptExtractor.js +53 -0
- package/dist/extraction/extractors/extendedTextExtractor.d.ts +21 -0
- package/dist/extraction/extractors/extendedTextExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/extendedTextExtractor.js +63 -0
- package/dist/extraction/extractors/gapMatchExtractor.d.ts +29 -0
- package/dist/extraction/extractors/gapMatchExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/gapMatchExtractor.js +155 -0
- package/dist/extraction/extractors/graphicAssociateExtractor.d.ts +41 -0
- package/dist/extraction/extractors/graphicAssociateExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/graphicAssociateExtractor.js +143 -0
- package/dist/extraction/extractors/graphicGapMatchExtractor.d.ts +53 -0
- package/dist/extraction/extractors/graphicGapMatchExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/graphicGapMatchExtractor.js +205 -0
- package/dist/extraction/extractors/graphicOrderExtractor.d.ts +37 -0
- package/dist/extraction/extractors/graphicOrderExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/graphicOrderExtractor.js +121 -0
- package/dist/extraction/extractors/hotspotExtractor.d.ts +38 -0
- package/dist/extraction/extractors/hotspotExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/hotspotExtractor.js +159 -0
- package/dist/extraction/extractors/hottextExtractor.d.ts +26 -0
- package/dist/extraction/extractors/hottextExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/hottextExtractor.js +128 -0
- package/dist/extraction/extractors/index.d.ts +63 -0
- package/dist/extraction/extractors/index.d.ts.map +1 -0
- package/dist/extraction/extractors/index.js +88 -0
- package/dist/extraction/extractors/inlineChoiceExtractor.d.ts +25 -0
- package/dist/extraction/extractors/inlineChoiceExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/inlineChoiceExtractor.js +80 -0
- package/dist/extraction/extractors/matchExtractor.d.ts +37 -0
- package/dist/extraction/extractors/matchExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/matchExtractor.js +160 -0
- package/dist/extraction/extractors/mediaExtractor.d.ts +33 -0
- package/dist/extraction/extractors/mediaExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/mediaExtractor.js +125 -0
- package/dist/extraction/extractors/orderExtractor.d.ts +28 -0
- package/dist/extraction/extractors/orderExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/orderExtractor.js +90 -0
- package/dist/extraction/extractors/portableCustomExtractor.d.ts +14 -0
- package/dist/extraction/extractors/portableCustomExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/portableCustomExtractor.js +96 -0
- package/dist/extraction/extractors/positionObjectExtractor.d.ts +59 -0
- package/dist/extraction/extractors/positionObjectExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/positionObjectExtractor.js +191 -0
- package/dist/extraction/extractors/selectPointExtractor.d.ts +31 -0
- package/dist/extraction/extractors/selectPointExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/selectPointExtractor.js +109 -0
- package/dist/extraction/extractors/sliderExtractor.d.ts +24 -0
- package/dist/extraction/extractors/sliderExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/sliderExtractor.js +73 -0
- package/dist/extraction/extractors/textEntryExtractor.d.ts +21 -0
- package/dist/extraction/extractors/textEntryExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/textEntryExtractor.js +54 -0
- package/dist/extraction/extractors/uploadExtractor.d.ts +20 -0
- package/dist/extraction/extractors/uploadExtractor.d.ts.map +1 -0
- package/dist/extraction/extractors/uploadExtractor.js +59 -0
- package/dist/extraction/index.d.ts +49 -0
- package/dist/extraction/index.d.ts.map +1 -0
- package/dist/extraction/index.js +49 -0
- package/dist/extraction/types.d.ts +209 -0
- package/dist/extraction/types.d.ts.map +1 -0
- package/dist/extraction/types.js +30 -0
- package/dist/extraction/utils.d.ts +15 -0
- package/dist/extraction/utils.d.ts.map +1 -0
- package/dist/extraction/utils.js +178 -0
- package/dist/iframe/IFramePlayerHost.d.ts +122 -0
- package/dist/iframe/IFramePlayerHost.d.ts.map +1 -0
- package/dist/iframe/IFramePlayerHost.js +172 -0
- package/dist/iframe/index.d.ts +9 -0
- package/dist/iframe/index.d.ts.map +1 -0
- package/dist/iframe/index.js +8 -0
- package/dist/iframe/protocol.d.ts +75 -0
- package/dist/iframe/protocol.d.ts.map +1 -0
- package/dist/iframe/protocol.js +53 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +42 -0
- package/dist/pci/PciHost.d.ts +53 -0
- package/dist/pci/PciHost.d.ts.map +1 -0
- package/dist/pci/PciHost.js +116 -0
- package/dist/pci/types.d.ts +57 -0
- package/dist/pci/types.d.ts.map +1 -0
- package/dist/pci/types.js +19 -0
- package/dist/pnp/applyPnp.d.ts +9 -0
- package/dist/pnp/applyPnp.d.ts.map +1 -0
- package/dist/pnp/applyPnp.js +19 -0
- package/dist/pnp/parsePnpXml.d.ts +9 -0
- package/dist/pnp/parsePnpXml.d.ts.map +1 -0
- package/dist/pnp/parsePnpXml.js +101 -0
- package/dist/pnp/types.d.ts +40 -0
- package/dist/pnp/types.d.ts.map +1 -0
- package/dist/pnp/types.js +1 -0
- package/dist/server.d.ts +10 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +10 -0
- package/dist/types/index.d.ts +304 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/interactions.d.ts +412 -0
- package/dist/types/interactions.d.ts.map +1 -0
- package/dist/types/interactions.js +7 -0
- package/dist/types/responseValidation.d.ts +25 -0
- package/dist/types/responseValidation.d.ts.map +1 -0
- package/dist/types/responseValidation.js +1 -0
- package/dist/utils/PerformanceMonitor.d.ts +170 -0
- package/dist/utils/PerformanceMonitor.d.ts.map +1 -0
- package/dist/utils/PerformanceMonitor.js +242 -0
- package/dist/utils/drawingUtils.d.ts +39 -0
- package/dist/utils/drawingUtils.d.ts.map +1 -0
- package/dist/utils/drawingUtils.js +57 -0
- package/dist/utils/responseUtils.d.ts +16 -0
- package/dist/utils/responseUtils.d.ts.map +1 -0
- package/dist/utils/responseUtils.js +45 -0
- package/dist/utils/touchDragHelper.d.ts +2 -0
- package/dist/utils/touchDragHelper.d.ts.map +1 -0
- package/dist/utils/touchDragHelper.js +1 -0
- package/dist/web-components/QTIInteractionBase.d.ts +120 -0
- package/dist/web-components/QTIInteractionBase.d.ts.map +1 -0
- package/dist/web-components/QTIInteractionBase.js +243 -0
- package/dist/web-components/QTIInteractionElement.d.ts +77 -0
- package/dist/web-components/QTIInteractionElement.d.ts.map +1 -0
- package/dist/web-components/QTIInteractionElement.js +61 -0
- package/dist/web-components/index.d.ts +8 -0
- package/dist/web-components/index.d.ts.map +1 -0
- package/dist/web-components/index.js +10 -0
- package/package.json +104 -76
- package/src/__tests__/catalog.test.ts +267 -0
- package/src/__tests__/fixtures/pci/echo-pci.js +49 -0
- package/src/__tests__/glossaryTriggers.test.ts +411 -0
- package/src/__tests__/pci.test.ts +353 -0
- package/src/__tests__/pnp.test.ts +250 -0
- package/src/__tests__/qti3-attribute-extraction.test.ts +174 -0
- package/src/__tests__/qti3-debug.test.ts +140 -0
- package/src/__tests__/qti3-extraction.test.ts +309 -0
- package/src/catalog/applyGlossaryTriggers.ts +232 -0
- package/src/catalog/catalogExtractor.ts +130 -0
- package/src/catalog/catalogLookup.ts +53 -0
- package/src/catalog/glossaryAction.ts +28 -0
- package/src/catalog/types.ts +37 -0
- package/src/components/ItemBody.svelte +136 -26
- package/src/components/ItemPlayer.svelte +6 -2
- package/src/components/index.ts +3 -0
- package/src/components/utils/assignProps.ts +1 -23
- package/src/core/ComponentRegistry.ts +14 -0
- package/src/core/ItemRenderer.ts +4 -0
- package/src/core/Player.ts +312 -38
- package/src/core/parsingLimits.ts +1 -1
- package/src/core/rolePolicy.ts +34 -0
- package/src/core/urlPolicy.ts +5 -2
- package/src/element.ts +128 -0
- package/src/extensions/MathLiveEditor.ts +6 -3
- package/src/extraction/ExtractionRegistry.ts +51 -11
- package/src/extraction/createContext.ts +6 -1
- package/src/extraction/extractors/associateExtractor.ts +4 -0
- package/src/extraction/extractors/choiceExtractor.ts +12 -1
- package/src/extraction/extractors/conformance-qti3-advanced.test.ts +239 -0
- package/src/extraction/extractors/conformance-qti3-basic.test.ts +82 -0
- package/src/extraction/extractors/conformance.test.ts +208 -0
- package/src/extraction/extractors/extendedTextExtractor.ts +11 -2
- package/src/extraction/extractors/gapMatchExtractor.ts +36 -21
- package/src/extraction/extractors/graphicAssociateExtractor.ts +4 -0
- package/src/extraction/extractors/graphicGapMatchExtractor.ts +82 -10
- package/src/extraction/extractors/hotspotExtractor.ts +26 -8
- package/src/extraction/extractors/hottextExtractor.ts +15 -5
- package/src/extraction/extractors/index.ts +4 -0
- package/src/extraction/extractors/inlineChoiceExtractor.ts +22 -5
- package/src/extraction/extractors/matchExtractor.ts +33 -6
- package/src/extraction/extractors/orderExtractor.ts +6 -0
- package/src/extraction/extractors/portableCustomExtractor.ts +122 -0
- package/src/extraction/extractors/selectPointExtractor.ts +5 -5
- package/src/extraction/extractors/textEntryExtractor.ts +11 -2
- package/src/extraction/extractors/uploadExtractor.ts +10 -2
- package/src/extraction/utils.ts +99 -16
- package/src/index.ts +19 -1
- package/src/pci/PciHost.ts +138 -0
- package/src/pci/types.ts +70 -0
- package/src/pnp/applyPnp.ts +23 -0
- package/src/pnp/parsePnpXml.ts +118 -0
- package/src/pnp/types.ts +33 -0
- package/src/types/index.ts +50 -16
- package/src/types/interactions.ts +81 -6
- package/src/types/xmldom.d.ts +12 -0
- package/src/utils/drawingUtils.ts +73 -0
- package/src/utils/touchDragHelper.ts +1 -211
- package/.turbo/turbo-build.log +0 -1
- package/CHANGELOG.md +0 -9
- package/docs/QTI-COMPLIANCE.md +0 -197
- package/docs/WCAG-2.2-COMPLIANCE.md +0 -466
- package/docs/custom-extractors.md +0 -679
- package/docs/iframe-mode.md +0 -78
- package/docs/security-audit.md +0 -236
- package/docs/server-api.md +0 -691
- package/tests/conformance/FIXTURE_POLICY.md +0 -29
- package/tests/conformance/README.md +0 -70
- package/tests/conformance/fixtures/baseTypes_all/cases.json +0 -61
- package/tests/conformance/fixtures/baseTypes_all/item.xml +0 -131
- package/tests/conformance/fixtures/baseTypes_all/manifest.json +0 -7
- package/tests/conformance/fixtures/choice_match_correct/cases.json +0 -17
- package/tests/conformance/fixtures/choice_match_correct/item.xml +0 -55
- package/tests/conformance/fixtures/choice_match_correct/manifest.json +0 -14
- package/tests/conformance/fixtures/contains_multiple/cases.json +0 -12
- package/tests/conformance/fixtures/contains_multiple/item.xml +0 -37
- package/tests/conformance/fixtures/contains_multiple/manifest.json +0 -13
- package/tests/conformance/fixtures/isNull_isNotNull/cases.json +0 -9
- package/tests/conformance/fixtures/isNull_isNotNull/item.xml +0 -41
- package/tests/conformance/fixtures/isNull_isNotNull/manifest.json +0 -23
- package/tests/conformance/fixtures/mapResponse_bounds_default_duplicates/cases.json +0 -27
- package/tests/conformance/fixtures/mapResponse_bounds_default_duplicates/item.xml +0 -30
- package/tests/conformance/fixtures/mapResponse_bounds_default_duplicates/manifest.json +0 -15
- package/tests/conformance/fixtures/mapResponse_integer_mapKey/cases.json +0 -11
- package/tests/conformance/fixtures/mapResponse_integer_mapKey/item.xml +0 -26
- package/tests/conformance/fixtures/mapResponse_integer_mapKey/manifest.json +0 -13
- package/tests/conformance/fixtures/mapResponse_mapEntry_caseSensitive_override/cases.json +0 -27
- package/tests/conformance/fixtures/mapResponse_mapEntry_caseSensitive_override/item.xml +0 -32
- package/tests/conformance/fixtures/mapResponse_mapEntry_caseSensitive_override/manifest.json +0 -7
- package/tests/conformance/fixtures/mapResponse_mapping_caseSensitive_defaultValue/cases.json +0 -9
- package/tests/conformance/fixtures/mapResponse_mapping_caseSensitive_defaultValue/item.xml +0 -25
- package/tests/conformance/fixtures/mapResponse_mapping_caseSensitive_defaultValue/manifest.json +0 -12
- package/tests/conformance/fixtures/mapResponse_multiple_cardinality/cases.json +0 -12
- package/tests/conformance/fixtures/mapResponse_multiple_cardinality/item.xml +0 -35
- package/tests/conformance/fixtures/mapResponse_multiple_cardinality/manifest.json +0 -11
- package/tests/conformance/fixtures/mapping_bounds_upperLower/cases.json +0 -12
- package/tests/conformance/fixtures/mapping_bounds_upperLower/item.xml +0 -37
- package/tests/conformance/fixtures/mapping_bounds_upperLower/manifest.json +0 -11
- package/tests/conformance/fixtures/mapping_mapResponse/cases.json +0 -22
- package/tests/conformance/fixtures/mapping_mapResponse/item.xml +0 -53
- package/tests/conformance/fixtures/mapping_mapResponse/manifest.json +0 -16
- package/tests/conformance/fixtures/member_multiple/cases.json +0 -12
- package/tests/conformance/fixtures/member_multiple/item.xml +0 -37
- package/tests/conformance/fixtures/member_multiple/manifest.json +0 -13
- package/tests/conformance/fixtures/modalFeedback_basic/cases.json +0 -17
- package/tests/conformance/fixtures/modalFeedback_basic/item.xml +0 -52
- package/tests/conformance/fixtures/modalFeedback_basic/manifest.json +0 -13
- package/tests/conformance/fixtures/multiple_unordered_match/cases.json +0 -17
- package/tests/conformance/fixtures/multiple_unordered_match/item.xml +0 -44
- package/tests/conformance/fixtures/multiple_unordered_match/manifest.json +0 -11
- package/tests/conformance/fixtures/ordered_match/cases.json +0 -17
- package/tests/conformance/fixtures/ordered_match/item.xml +0 -48
- package/tests/conformance/fixtures/ordered_match/manifest.json +0 -13
- package/tests/conformance/fixtures/outcomeProcessing_derive_percent_passfail/cases.json +0 -27
- package/tests/conformance/fixtures/outcomeProcessing_derive_percent_passfail/item.xml +0 -103
- package/tests/conformance/fixtures/outcomeProcessing_derive_percent_passfail/manifest.json +0 -7
- package/tests/conformance/fixtures/outcomeProcessing_exitTest/cases.json +0 -15
- package/tests/conformance/fixtures/outcomeProcessing_exitTest/item.xml +0 -33
- package/tests/conformance/fixtures/outcomeProcessing_exitTest/manifest.json +0 -10
- package/tests/conformance/fixtures/outcomeProcessing_numberExpressions/cases.json +0 -14
- package/tests/conformance/fixtures/outcomeProcessing_numberExpressions/item.xml +0 -26
- package/tests/conformance/fixtures/outcomeProcessing_numberExpressions/manifest.json +0 -8
- package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_equal/cases.json +0 -17
- package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_equal/item.xml +0 -43
- package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_equal/manifest.json +0 -16
- package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_toBoolean/cases.json +0 -27
- package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_toBoolean/item.xml +0 -37
- package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_toBoolean/manifest.json +0 -16
- package/tests/conformance/fixtures/outcomeProcessing_outcomeMaximum/cases.json +0 -14
- package/tests/conformance/fixtures/outcomeProcessing_outcomeMaximum/item.xml +0 -35
- package/tests/conformance/fixtures/outcomeProcessing_outcomeMaximum/manifest.json +0 -8
- package/tests/conformance/fixtures/outcomeProcessing_outcomeMinimum/cases.json +0 -14
- package/tests/conformance/fixtures/outcomeProcessing_outcomeMinimum/item.xml +0 -35
- package/tests/conformance/fixtures/outcomeProcessing_outcomeMinimum/manifest.json +0 -8
- package/tests/conformance/fixtures/outcomeProcessing_outcomeProcessingFragment/cases.json +0 -15
- package/tests/conformance/fixtures/outcomeProcessing_outcomeProcessingFragment/item.xml +0 -39
- package/tests/conformance/fixtures/outcomeProcessing_outcomeProcessingFragment/manifest.json +0 -11
- package/tests/conformance/fixtures/outcomeProcessing_testVariables/cases.json +0 -14
- package/tests/conformance/fixtures/outcomeProcessing_testVariables/item.xml +0 -35
- package/tests/conformance/fixtures/outcomeProcessing_testVariables/manifest.json +0 -8
- package/tests/conformance/fixtures/pair_unordered_match/cases.json +0 -22
- package/tests/conformance/fixtures/pair_unordered_match/item.xml +0 -44
- package/tests/conformance/fixtures/pair_unordered_match/manifest.json +0 -13
- package/tests/conformance/fixtures/positionObject_coordinateSystem_aspectRatio/cases.json +0 -95
- package/tests/conformance/fixtures/positionObject_coordinateSystem_aspectRatio/item.xml +0 -53
- package/tests/conformance/fixtures/positionObject_mapResponsePoint_scoring/cases.json +0 -115
- package/tests/conformance/fixtures/positionObject_mapResponsePoint_scoring/item.xml +0 -45
- package/tests/conformance/fixtures/positionObject_mapResponse_wrong/cases.json +0 -29
- package/tests/conformance/fixtures/positionObject_mapResponse_wrong/item.xml +0 -40
- package/tests/conformance/fixtures/responseCondition_elseIf_chain/cases.json +0 -10
- package/tests/conformance/fixtures/responseCondition_elseIf_chain/item.xml +0 -49
- package/tests/conformance/fixtures/responseCondition_elseIf_chain/manifest.json +0 -15
- package/tests/conformance/fixtures/responseProcessing_anyN/cases.json +0 -27
- package/tests/conformance/fixtures/responseProcessing_anyN/item.xml +0 -47
- package/tests/conformance/fixtures/responseProcessing_anyN/manifest.json +0 -16
- package/tests/conformance/fixtures/responseProcessing_anyN_allN/cases.json +0 -27
- package/tests/conformance/fixtures/responseProcessing_anyN_allN/item.xml +0 -69
- package/tests/conformance/fixtures/responseProcessing_anyN_allN/manifest.json +0 -23
- package/tests/conformance/fixtures/responseProcessing_arithmetic_nulls/cases.json +0 -15
- package/tests/conformance/fixtures/responseProcessing_arithmetic_nulls/item.xml +0 -58
- package/tests/conformance/fixtures/responseProcessing_arithmetic_nulls/manifest.json +0 -15
- package/tests/conformance/fixtures/responseProcessing_boolean_compare_ops/cases.json +0 -37
- package/tests/conformance/fixtures/responseProcessing_boolean_compare_ops/item.xml +0 -94
- package/tests/conformance/fixtures/responseProcessing_boolean_compare_ops/manifest.json +0 -27
- package/tests/conformance/fixtures/responseProcessing_containerSize_index/cases.json +0 -33
- package/tests/conformance/fixtures/responseProcessing_containerSize_index/item.xml +0 -79
- package/tests/conformance/fixtures/responseProcessing_containerSize_index/manifest.json +0 -16
- package/tests/conformance/fixtures/responseProcessing_customOperator/cases.json +0 -15
- package/tests/conformance/fixtures/responseProcessing_customOperator/item.xml +0 -30
- package/tests/conformance/fixtures/responseProcessing_customOperator/manifest.json +0 -12
- package/tests/conformance/fixtures/responseProcessing_default_expression/cases.json +0 -12
- package/tests/conformance/fixtures/responseProcessing_default_expression/item.xml +0 -48
- package/tests/conformance/fixtures/responseProcessing_default_expression/manifest.json +0 -13
- package/tests/conformance/fixtures/responseProcessing_deleteValue_repeat/cases.json +0 -29
- package/tests/conformance/fixtures/responseProcessing_deleteValue_repeat/item.xml +0 -68
- package/tests/conformance/fixtures/responseProcessing_deleteValue_repeat/manifest.json +0 -17
- package/tests/conformance/fixtures/responseProcessing_equalRounded_tolerance/cases.json +0 -39
- package/tests/conformance/fixtures/responseProcessing_equalRounded_tolerance/item.xml +0 -39
- package/tests/conformance/fixtures/responseProcessing_equalRounded_tolerance/manifest.json +0 -17
- package/tests/conformance/fixtures/responseProcessing_exitResponse/cases.json +0 -12
- package/tests/conformance/fixtures/responseProcessing_exitResponse/item.xml +0 -25
- package/tests/conformance/fixtures/responseProcessing_exitResponse/manifest.json +0 -12
- package/tests/conformance/fixtures/responseProcessing_inside_duration_statsOperator/cases.json +0 -26
- package/tests/conformance/fixtures/responseProcessing_inside_duration_statsOperator/item.xml +0 -134
- package/tests/conformance/fixtures/responseProcessing_inside_duration_statsOperator/manifest.json +0 -16
- package/tests/conformance/fixtures/responseProcessing_lookupTable_interpolationTable/cases.json +0 -27
- package/tests/conformance/fixtures/responseProcessing_lookupTable_interpolationTable/item.xml +0 -33
- package/tests/conformance/fixtures/responseProcessing_lookupTable_interpolationTable/manifest.json +0 -13
- package/tests/conformance/fixtures/responseProcessing_lookupTable_matchTable/cases.json +0 -22
- package/tests/conformance/fixtures/responseProcessing_lookupTable_matchTable/item.xml +0 -33
- package/tests/conformance/fixtures/responseProcessing_lookupTable_matchTable/manifest.json +0 -13
- package/tests/conformance/fixtures/responseProcessing_mapOutcome_basic/cases.json +0 -27
- package/tests/conformance/fixtures/responseProcessing_mapOutcome_basic/item.xml +0 -40
- package/tests/conformance/fixtures/responseProcessing_mapOutcome_basic/manifest.json +0 -18
- package/tests/conformance/fixtures/responseProcessing_mapResponsePoint_basic/cases.json +0 -22
- package/tests/conformance/fixtures/responseProcessing_mapResponsePoint_basic/item.xml +0 -33
- package/tests/conformance/fixtures/responseProcessing_mapResponsePoint_basic/manifest.json +0 -12
- package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_ordered/cases.json +0 -29
- package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_ordered/item.xml +0 -26
- package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_ordered/manifest.json +0 -7
- package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_whitespace/cases.json +0 -23
- package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_whitespace/item.xml +0 -28
- package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_whitespace/manifest.json +0 -11
- package/tests/conformance/fixtures/responseProcessing_mapResponse_pair_unordered/cases.json +0 -29
- package/tests/conformance/fixtures/responseProcessing_mapResponse_pair_unordered/item.xml +0 -26
- package/tests/conformance/fixtures/responseProcessing_mapResponse_pair_unordered/manifest.json +0 -7
- package/tests/conformance/fixtures/responseProcessing_mathOperator_integerUtils/cases.json +0 -31
- package/tests/conformance/fixtures/responseProcessing_mathOperator_integerUtils/item.xml +0 -102
- package/tests/conformance/fixtures/responseProcessing_mathOperator_integerUtils/manifest.json +0 -18
- package/tests/conformance/fixtures/responseProcessing_math_max_min_round_truncate/cases.json +0 -22
- package/tests/conformance/fixtures/responseProcessing_math_max_min_round_truncate/item.xml +0 -45
- package/tests/conformance/fixtures/responseProcessing_math_max_min_round_truncate/manifest.json +0 -21
- package/tests/conformance/fixtures/responseProcessing_misc_math_string_stats/cases.json +0 -26
- package/tests/conformance/fixtures/responseProcessing_misc_math_string_stats/item.xml +0 -157
- package/tests/conformance/fixtures/responseProcessing_misc_math_string_stats/manifest.json +0 -22
- package/tests/conformance/fixtures/responseProcessing_notEqual_basic/cases.json +0 -22
- package/tests/conformance/fixtures/responseProcessing_notEqual_basic/item.xml +0 -39
- package/tests/conformance/fixtures/responseProcessing_notEqual_basic/manifest.json +0 -18
- package/tests/conformance/fixtures/responseProcessing_patternMatch_caseSensitive/cases.json +0 -22
- package/tests/conformance/fixtures/responseProcessing_patternMatch_caseSensitive/item.xml +0 -51
- package/tests/conformance/fixtures/responseProcessing_patternMatch_caseSensitive/manifest.json +0 -19
- package/tests/conformance/fixtures/responseProcessing_preCondition/cases.json +0 -31
- package/tests/conformance/fixtures/responseProcessing_preCondition/item.xml +0 -44
- package/tests/conformance/fixtures/responseProcessing_preCondition/manifest.json +0 -12
- package/tests/conformance/fixtures/responseProcessing_random_lookupOutcomeValue/cases.json +0 -27
- package/tests/conformance/fixtures/responseProcessing_random_lookupOutcomeValue/item.xml +0 -42
- package/tests/conformance/fixtures/responseProcessing_random_lookupOutcomeValue/manifest.json +0 -14
- package/tests/conformance/fixtures/responseProcessing_record_fieldValue/cases.json +0 -12
- package/tests/conformance/fixtures/responseProcessing_record_fieldValue/item.xml +0 -40
- package/tests/conformance/fixtures/responseProcessing_record_fieldValue/manifest.json +0 -17
- package/tests/conformance/fixtures/responseProcessing_responseCondition_toBoolean/cases.json +0 -17
- package/tests/conformance/fixtures/responseProcessing_responseCondition_toBoolean/item.xml +0 -63
- package/tests/conformance/fixtures/responseProcessing_responseCondition_toBoolean/manifest.json +0 -9
- package/tests/conformance/fixtures/responseProcessing_responseProcessingFragment/cases.json +0 -12
- package/tests/conformance/fixtures/responseProcessing_responseProcessingFragment/item.xml +0 -40
- package/tests/conformance/fixtures/responseProcessing_responseProcessingFragment/manifest.json +0 -13
- package/tests/conformance/fixtures/responseProcessing_setDefaultValue/cases.json +0 -15
- package/tests/conformance/fixtures/responseProcessing_setDefaultValue/item.xml +0 -67
- package/tests/conformance/fixtures/responseProcessing_setDefaultValue/manifest.json +0 -9
- package/tests/conformance/fixtures/responseProcessing_setResponseValue_setDefaultValue/cases.json +0 -27
- package/tests/conformance/fixtures/responseProcessing_setResponseValue_setDefaultValue/item.xml +0 -69
- package/tests/conformance/fixtures/responseProcessing_setResponseValue_setDefaultValue/manifest.json +0 -10
- package/tests/conformance/fixtures/responseProcessing_subtract_divide/cases.json +0 -15
- package/tests/conformance/fixtures/responseProcessing_subtract_divide/item.xml +0 -35
- package/tests/conformance/fixtures/responseProcessing_subtract_divide/manifest.json +0 -11
- package/tests/conformance/fixtures/responseProcessing_template_map_response/cases.json +0 -17
- package/tests/conformance/fixtures/responseProcessing_template_map_response/item.xml +0 -31
- package/tests/conformance/fixtures/responseProcessing_template_map_response/manifest.json +0 -8
- package/tests/conformance/fixtures/responseProcessing_template_map_response_point/cases.json +0 -22
- package/tests/conformance/fixtures/responseProcessing_template_map_response_point/item.xml +0 -27
- package/tests/conformance/fixtures/responseProcessing_template_map_response_point/manifest.json +0 -8
- package/tests/conformance/fixtures/responseProcessing_template_match_correct/cases.json +0 -17
- package/tests/conformance/fixtures/responseProcessing_template_match_correct/item.xml +0 -34
- package/tests/conformance/fixtures/responseProcessing_template_match_correct/manifest.json +0 -8
- package/tests/conformance/fixtures/responseProcessing_template_match_correct_directedPair/cases.json +0 -22
- package/tests/conformance/fixtures/responseProcessing_template_match_correct_directedPair/item.xml +0 -30
- package/tests/conformance/fixtures/responseProcessing_template_match_correct_directedPair/manifest.json +0 -7
- package/tests/conformance/fixtures/responseProcessing_template_match_correct_two_responses/cases.json +0 -17
- package/tests/conformance/fixtures/responseProcessing_template_match_correct_two_responses/item.xml +0 -30
- package/tests/conformance/fixtures/responseProcessing_template_match_correct_two_responses/manifest.json +0 -9
- package/tests/conformance/fixtures/responseProcessing_template_match_nothing/cases.json +0 -17
- package/tests/conformance/fixtures/responseProcessing_template_match_nothing/item.xml +0 -30
- package/tests/conformance/fixtures/responseProcessing_template_match_nothing/manifest.json +0 -8
- package/tests/conformance/fixtures/responseProcessing_xiInclude/cases.json +0 -14
- package/tests/conformance/fixtures/responseProcessing_xiInclude/item.xml +0 -25
- package/tests/conformance/fixtures/responseProcessing_xiInclude/manifest.json +0 -9
- package/tests/conformance/fixtures/stringMatch_caseSensitive_substring/cases.json +0 -12
- package/tests/conformance/fixtures/stringMatch_caseSensitive_substring/item.xml +0 -52
- package/tests/conformance/fixtures/stringMatch_caseSensitive_substring/manifest.json +0 -14
- package/tests/conformance/fixtures/templateProcessing_exitTemplate/cases.json +0 -12
- package/tests/conformance/fixtures/templateProcessing_exitTemplate/item.xml +0 -48
- package/tests/conformance/fixtures/templateProcessing_exitTemplate/manifest.json +0 -13
- package/tests/conformance/fixtures/templateProcessing_setCorrectResponse/cases.json +0 -27
- package/tests/conformance/fixtures/templateProcessing_setCorrectResponse/item.xml +0 -74
- package/tests/conformance/fixtures/templateProcessing_setCorrectResponse/manifest.json +0 -22
- package/tests/conformance/fixtures/templateProcessing_templateCondition_branching/cases.json +0 -17
- package/tests/conformance/fixtures/templateProcessing_templateCondition_branching/item.xml +0 -133
- package/tests/conformance/fixtures/templateProcessing_templateCondition_branching/manifest.json +0 -22
- package/tests/conformance/fixtures/templateProcessing_templateCondition_toBoolean/cases.json +0 -12
- package/tests/conformance/fixtures/templateProcessing_templateCondition_toBoolean/item.xml +0 -107
- package/tests/conformance/fixtures/templateProcessing_templateCondition_toBoolean/manifest.json +0 -16
- package/tests/conformance/fixtures/templateProcessing_templateConstraint/cases.json +0 -15
- package/tests/conformance/fixtures/templateProcessing_templateConstraint/item.xml +0 -52
- package/tests/conformance/fixtures/templateProcessing_templateConstraint/manifest.json +0 -14
- package/tests/conformance/fixtures/template_randomFloat_roundTo_mathConstant/cases.json +0 -16
- package/tests/conformance/fixtures/template_randomFloat_roundTo_mathConstant/item.xml +0 -49
- package/tests/conformance/fixtures/template_randomFloat_roundTo_mathConstant/manifest.json +0 -15
- package/tests/conformance/fixtures/template_randomInteger_printedVariable/cases.json +0 -16
- package/tests/conformance/fixtures/template_randomInteger_printedVariable/item.xml +0 -38
- package/tests/conformance/fixtures/template_randomInteger_printedVariable/manifest.json +0 -13
- package/tests/conformance/harness.ts +0 -84
- package/tests/conformance/run-fixtures.test.ts +0 -127
- package/tests/conformance/scripts/normalize-covers.ts +0 -152
- package/tests/conformance/types.ts +0 -53
- package/tests/core/Player.test.ts +0 -563
- package/tests/core/adaptiveItems.test.ts +0 -442
- package/tests/core/correctResponse.test.ts +0 -280
- package/tests/core/interaction-plumbing.test.ts +0 -141
- package/tests/core/modalFeedback.test.ts +0 -308
- package/tests/core/outcome-reset.test.ts +0 -43
- package/tests/extraction/extractors/associateExtractor.test.ts +0 -182
- package/tests/extraction/extractors/choiceExtractor.test.ts +0 -239
- package/tests/extraction/extractors/customExtractor.test.ts +0 -83
- package/tests/extraction/extractors/drawingExtractor.test.ts +0 -94
- package/tests/extraction/extractors/endAttemptExtractor.test.ts +0 -188
- package/tests/extraction/extractors/extendedTextExtractor.test.ts +0 -178
- package/tests/extraction/extractors/gapMatchExtractor.test.ts +0 -318
- package/tests/extraction/extractors/graphicAssociateExtractor.test.ts +0 -260
- package/tests/extraction/extractors/graphicGapMatchExtractor.test.ts +0 -320
- package/tests/extraction/extractors/graphicOrderExtractor.test.ts +0 -223
- package/tests/extraction/extractors/hotspotExtractor.test.ts +0 -298
- package/tests/extraction/extractors/hottextExtractor.test.ts +0 -240
- package/tests/extraction/extractors/inlineChoiceExtractor.test.ts +0 -292
- package/tests/extraction/extractors/matchExtractor.test.ts +0 -241
- package/tests/extraction/extractors/mediaExtractor.test.ts +0 -295
- package/tests/extraction/extractors/orderExtractor.test.ts +0 -212
- package/tests/extraction/extractors/positionObjectExtractor.test.ts +0 -363
- package/tests/extraction/extractors/selectPointExtractor.test.ts +0 -214
- package/tests/extraction/extractors/sliderExtractor.test.ts +0 -293
- package/tests/extraction/extractors/textEntryExtractor.test.ts +0 -133
- package/tests/extraction/extractors/uploadExtractor.test.ts +0 -119
- package/tests/extraction/test-utils.ts +0 -57
- package/tests/iframe/host.test.ts +0 -145
- package/tests/iframe/protocol.test.ts +0 -42
- package/tests/performance/player-benchmarks.bench.ts +0 -191
- package/tests/security/dos-limits.test.ts +0 -56
- package/tests/security/xss-prevention.test.ts +0 -522
- package/tsconfig.json +0 -20
- package/tsconfig.svelte.json +0 -14
package/docs/QTI-COMPLIANCE.md
DELETED
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
# QTI 2.2 Specification Compliance
|
|
2
|
-
|
|
3
|
-
## Compliance Level
|
|
4
|
-
|
|
5
|
-
This player implements **QTI 2.2** as the baseline specification with backward compatibility for QTI 2.0/2.1.
|
|
6
|
-
|
|
7
|
-
## Supported QTI Features
|
|
8
|
-
|
|
9
|
-
### Interactions (21 Standard Types)
|
|
10
|
-
All 21 standard QTI 2.2 interactions are supported:
|
|
11
|
-
|
|
12
|
-
- **Choice Interactions**: `choiceInteraction`, `inlineChoiceInteraction`, `orderInteraction`, `associateInteraction`
|
|
13
|
-
- **Text Interactions**: `textEntryInteraction`, `extendedTextInteraction`
|
|
14
|
-
- **Graphic Interactions**: `hotspotInteraction`, `hottext Interaction`, `graphicOrderInteraction`, `graphicAssociateInteraction`, `graphicGapMatchInteraction`, `selectPointInteraction`, `positionObjectInteraction`
|
|
15
|
-
- **Match Interactions**: `matchInteraction`, `gapMatchInteraction`
|
|
16
|
-
- **Media Interactions**: `mediaInteraction`, `uploadInteraction`
|
|
17
|
-
- **Drawing**: `drawingInteraction`
|
|
18
|
-
- **Slider**: `sliderInteraction`
|
|
19
|
-
- **Custom**: `customInteraction`
|
|
20
|
-
- **End Attempt**: `endAttemptInteraction`
|
|
21
|
-
|
|
22
|
-
See the [Interactions Guide](./interactions.md) for detailed documentation.
|
|
23
|
-
|
|
24
|
-
### Response Processing Templates
|
|
25
|
-
|
|
26
|
-
The player supports both QTI 2.2 standard templates and QTI 2.1 Common Cartridge (CC2) aliases:
|
|
27
|
-
|
|
28
|
-
| QTI 2.2 Template | QTI 2.1 CC2 Alias | Description |
|
|
29
|
-
|------------------|-------------------|-------------|
|
|
30
|
-
| `match_correct` | `cc2_match` | Scores 1 if all responses match correct values, 0 otherwise |
|
|
31
|
-
| `match_nothing` | `cc2_match_nothing` | Scores 1 if all responses are empty, 0 otherwise |
|
|
32
|
-
| `map_response` | `cc2_map_response` | Maps response values using mapping definitions |
|
|
33
|
-
| `map_response_point` | `cc2_map_response_point` | Maps point responses using area mapping |
|
|
34
|
-
|
|
35
|
-
**Template Resolution:** The player extracts only the template filename from the full URL, making resolution namespace-agnostic. Templates from v2p0, v2p1, and v2p2 namespaces all work identically.
|
|
36
|
-
|
|
37
|
-
### QTI Roles
|
|
38
|
-
|
|
39
|
-
All 6 standard QTI roles are supported:
|
|
40
|
-
- ✅ `candidate` - Student taking the assessment
|
|
41
|
-
- ✅ `scorer` - Person scoring responses
|
|
42
|
-
- ✅ `tutor` - Tutor/instructor viewing with feedback
|
|
43
|
-
- ✅ `author` - Content author with full visibility
|
|
44
|
-
- ✅ `testConstructor` - Assessment designer
|
|
45
|
-
- ✅ `proctor` - Test administrator
|
|
46
|
-
|
|
47
|
-
## Known Vendor Extensions
|
|
48
|
-
|
|
49
|
-
### positionObjectInteraction - Multiple Stages
|
|
50
|
-
**Status**: Non-standard extension (always enabled)
|
|
51
|
-
|
|
52
|
-
**QTI 2.2 Spec Limitation:**
|
|
53
|
-
The standard `positionObjectInteraction` only supports:
|
|
54
|
-
- Single `positionObjectStage` element
|
|
55
|
-
- Single draggable object (placed multiple times)
|
|
56
|
-
- Response format: `baseType="point"` with coordinates only
|
|
57
|
-
|
|
58
|
-
**Extension Behavior:**
|
|
59
|
-
This player allows multiple `positionObjectStage` elements with identifiers, enabling "place labeled objects on map" scenarios.
|
|
60
|
-
|
|
61
|
-
**Limitation:**
|
|
62
|
-
The response format cannot preserve object identity per QTI spec.
|
|
63
|
-
|
|
64
|
-
**Recommended Alternative:**
|
|
65
|
-
Use `graphicGapMatchInteraction` for spec-compliant labeled object placement.
|
|
66
|
-
|
|
67
|
-
**Rationale:**
|
|
68
|
-
The standard `positionObjectInteraction` is too limited for common educational use cases where different objects need to be placed on a map.
|
|
69
|
-
|
|
70
|
-
## Strict Compliance Mode
|
|
71
|
-
|
|
72
|
-
Enable strict mode to enforce QTI 2.2 compliance and log/reject vendor extensions:
|
|
73
|
-
|
|
74
|
-
```typescript
|
|
75
|
-
import { Player } from '@pie-qti/item-player';
|
|
76
|
-
|
|
77
|
-
const player = new Player({
|
|
78
|
-
itemXml: qtiXml,
|
|
79
|
-
strictQtiCompliance: {
|
|
80
|
-
enabled: true, // Enable strict QTI 2.2 validation
|
|
81
|
-
rejectUnknownExtensions: true, // Throw errors on non-2.2 versions
|
|
82
|
-
logDeviations: true // Log warnings for spec deviations
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### Configuration Options
|
|
88
|
-
|
|
89
|
-
| Option | Default | Description |
|
|
90
|
-
|--------|---------|-------------|
|
|
91
|
-
| `enabled` | `false` | Enable strict QTI 2.2 compliance checking |
|
|
92
|
-
| `rejectUnknownExtensions` | `false` | Throw errors if item version is not 2.2 |
|
|
93
|
-
| `logDeviations` | `true` | Log console warnings for spec deviations |
|
|
94
|
-
|
|
95
|
-
## Version Detection
|
|
96
|
-
|
|
97
|
-
The player automatically detects QTI version using multiple strategies:
|
|
98
|
-
|
|
99
|
-
### Detection Order
|
|
100
|
-
1. **Namespace URI** - Checks for `v2p0`, `v2p1`, or `v2p2` in namespace
|
|
101
|
-
```xml
|
|
102
|
-
<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2">
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
2. **Version Attribute** - Reads explicit version attribute
|
|
106
|
-
```xml
|
|
107
|
-
<assessmentItem version="2.2">
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
3. **Fallback** - Assumes QTI 2.2 if version cannot be determined
|
|
111
|
-
|
|
112
|
-
### Version Logging
|
|
113
|
-
|
|
114
|
-
The player logs version information to console:
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
[QTI Player] QTI 2.1 detected. Using QTI 2.2 compatibility mode with CC2 template support.
|
|
118
|
-
[QTI Player] QTI 2.0 detected. Some features may not be fully supported. QTI 2.2 is recommended.
|
|
119
|
-
[QTI Player] Could not detect QTI version. Assuming QTI 2.2 compatibility.
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Known Limitations
|
|
123
|
-
|
|
124
|
-
### QTI 2.0 Items
|
|
125
|
-
- ❌ `adaptive` attribute not supported (QTI 2.2 only feature)
|
|
126
|
-
- ⚠️ Some response processing rules may behave differently
|
|
127
|
-
- ✅ Template URLs must use standard filenames (namespace-agnostic matching)
|
|
128
|
-
- ⚠️ Limited testing with real QTI 2.0 content
|
|
129
|
-
|
|
130
|
-
### QTI 2.1 Items
|
|
131
|
-
- ✅ Fully supported with CC2 template aliases
|
|
132
|
-
- ✅ Common Cartridge content packages work correctly
|
|
133
|
-
- ✅ Namespace differences handled transparently
|
|
134
|
-
|
|
135
|
-
### QTI 2.2 Items
|
|
136
|
-
- ✅ Full support (recommended baseline)
|
|
137
|
-
- ✅ All 21 standard interactions
|
|
138
|
-
- ✅ Adaptive items supported
|
|
139
|
-
- ✅ All response processing templates
|
|
140
|
-
|
|
141
|
-
## Namespace Handling
|
|
142
|
-
|
|
143
|
-
The player uses **namespace-agnostic** element matching:
|
|
144
|
-
|
|
145
|
-
```typescript
|
|
146
|
-
// Uses Element.localName, ignoring namespace prefixes
|
|
147
|
-
findDescendants(element, 'responseDeclaration')
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
This design choice ensures:
|
|
151
|
-
- QTI 2.0, 2.1, and 2.2 items work identically
|
|
152
|
-
- Namespace differences don't break element lookup
|
|
153
|
-
- Template filename-based matching (not full URL matching)
|
|
154
|
-
|
|
155
|
-
## Testing
|
|
156
|
-
|
|
157
|
-
Test fixtures for different QTI versions are located in:
|
|
158
|
-
- `__tests__/fixtures/qti2.0/` - QTI 2.0 test items
|
|
159
|
-
- `__tests__/fixtures/qti2.1/` - QTI 2.1 test items
|
|
160
|
-
- `__tests__/fixtures/qti2.2/` - QTI 2.2 test items
|
|
161
|
-
|
|
162
|
-
Run tests with:
|
|
163
|
-
```bash
|
|
164
|
-
cd packages/item-player
|
|
165
|
-
bun test
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## Migration Guide
|
|
169
|
-
|
|
170
|
-
### From QTI 2.0/2.1 to QTI 2.2
|
|
171
|
-
|
|
172
|
-
**Template Names:**
|
|
173
|
-
- Replace `cc2_match` with `match_correct` (both still supported)
|
|
174
|
-
- Replace `cc2_map_response` with `map_response` (both still supported)
|
|
175
|
-
- No breaking changes - old names work via aliases
|
|
176
|
-
|
|
177
|
-
**Namespace Updates:**
|
|
178
|
-
```xml
|
|
179
|
-
<!-- QTI 2.1 -->
|
|
180
|
-
<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1">
|
|
181
|
-
|
|
182
|
-
<!-- QTI 2.2 (recommended) -->
|
|
183
|
-
<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2">
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
**Adaptive Items:**
|
|
187
|
-
Only available in QTI 2.2. Add `adaptive="true"` attribute:
|
|
188
|
-
```xml
|
|
189
|
-
<assessmentItem adaptive="true" xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2">
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
## Additional Resources
|
|
193
|
-
|
|
194
|
-
- [QTI 2.2 Specification](http://www.imsglobal.org/question/qtiv2p2/imsqti_v2p2.html)
|
|
195
|
-
- [QTI 2.1 Specification](http://www.imsglobal.org/question/qtiv2p1/imsqti_v2p1.html)
|
|
196
|
-
- [Common Cartridge Profile](http://www.imsglobal.org/cc/)
|
|
197
|
-
- [PIE QTI Player Documentation](../README.md)
|
|
@@ -1,466 +0,0 @@
|
|
|
1
|
-
# WCAG 2.2 Accessibility Analysis - QTI 2.2 Player Components
|
|
2
|
-
|
|
3
|
-
**Package:** `@pie-qti/item-player`
|
|
4
|
-
**Target:** WCAG 2.2 Level AA Guidelines
|
|
5
|
-
**Date:** December 25, 2024
|
|
6
|
-
**Status:** Tested against WCAG 2.2 Level AA guidelines (not formally certified)
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Executive Summary
|
|
11
|
-
|
|
12
|
-
The QTI 2.2 Player package provides reusable, framework-agnostic components for rendering QTI assessment interactions. The current implementation **follows WCAG 2.2 Level AA guidelines** with comprehensive keyboard support, ARIA implementation, and screen reader announcements.
|
|
13
|
-
|
|
14
|
-
> **Note:** This analysis represents internal testing against WCAG guidelines. It is not a formal third-party accessibility audit or certification.
|
|
15
|
-
|
|
16
|
-
This document analyzes the **9 new success criteria** added in WCAG 2.2 and assesses compliance status for the player components.
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Package Scope
|
|
21
|
-
|
|
22
|
-
**Accessibility scope covers:**
|
|
23
|
-
- ✅ Core Player class (XML parsing, state management) - No UI, N/A for visual accessibility
|
|
24
|
-
- ✅ Processors (data transformation) - No UI, N/A for visual accessibility
|
|
25
|
-
- ✅ **Svelte UI Components** (PRIMARY FOCUS):
|
|
26
|
-
- `SortableList.svelte` - Reorderable list for orderInteraction
|
|
27
|
-
- `MatchDragDrop.svelte` - Matching interface for matchInteraction
|
|
28
|
-
- `GraphicGapMatch.svelte` - Image-based gap matching
|
|
29
|
-
- `InlineInteractionRenderer.svelte` - Inline interaction rendering
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## WCAG 2.2 New Success Criteria Analysis
|
|
34
|
-
|
|
35
|
-
### 2.4.11 Focus Not Obscured (Minimum) - Level AA ⚠️
|
|
36
|
-
|
|
37
|
-
**Requirement:** When a user interface component receives keyboard focus, the component is not entirely hidden by author-created content.
|
|
38
|
-
|
|
39
|
-
**Current Status:** ✅ **COMPLIANT**
|
|
40
|
-
|
|
41
|
-
**Player Components Analysis:**
|
|
42
|
-
- ✅ **SortableList**: No fixed headers/footers that could obscure focused items
|
|
43
|
-
- ✅ **MatchDragDrop**: Items remain visible when focused
|
|
44
|
-
- ✅ **GraphicGapMatch**: Drop zones and draggable items are fully visible when focused
|
|
45
|
-
- ✅ **InlineInteractionRenderer**: Inline inputs remain visible in document flow
|
|
46
|
-
|
|
47
|
-
**Notes:**
|
|
48
|
-
- Player components do not create sticky headers, modals, or overlays
|
|
49
|
-
- Focus indicators use `ring-2` and `ring-primary` classes (2px border, visible contrast)
|
|
50
|
-
- Consumers of the library are responsible for page-level focus management
|
|
51
|
-
|
|
52
|
-
**Recommendation:** Document that consuming applications must ensure player components are not obscured by their own UI elements.
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
### 2.4.12 Focus Not Obscured (Enhanced) - Level AAA ℹ️
|
|
57
|
-
|
|
58
|
-
**Requirement:** When a user interface component receives keyboard focus, no part of the component is hidden by author-created content.
|
|
59
|
-
|
|
60
|
-
**Current Status:** ✅ **COMPLIANT** (AAA level)
|
|
61
|
-
|
|
62
|
-
**Notes:**
|
|
63
|
-
- Same as 2.4.11 but stricter (no partial obscuring)
|
|
64
|
-
- Player components meet this enhanced level by default
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
### 2.4.13 Focus Appearance - Level AAA ℹ️
|
|
69
|
-
|
|
70
|
-
**Requirement:** When the keyboard focus indicator is visible, an area of the focus indicator meets minimum size and contrast requirements.
|
|
71
|
-
|
|
72
|
-
**Current Status:** ✅ **MEETS MINIMUM** (Level AAA partially compliant)
|
|
73
|
-
|
|
74
|
-
**Player Components Analysis:**
|
|
75
|
-
- Focus indicator: `ring-2` (2px solid border) with `ring-primary` color
|
|
76
|
-
- DaisyUI `primary` color in default theme: `#570df8` (purple/blue)
|
|
77
|
-
- Contrast ratio depends on theme choice
|
|
78
|
-
|
|
79
|
-
**Measured Focus Indicators:**
|
|
80
|
-
- **Border thickness:** 2px ✅ (meets minimum)
|
|
81
|
-
- **Contrast ratio:** Theme-dependent ⚠️
|
|
82
|
-
- Default DaisyUI themes generally exceed 3:1
|
|
83
|
-
- Custom themes may need verification
|
|
84
|
-
|
|
85
|
-
**Recommendation:**
|
|
86
|
-
- Document that consuming applications should verify focus indicator contrast in custom themes
|
|
87
|
-
- Consider adding focus indicator testing to CI/CD
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
### 2.5.7 Dragging Movements - Level AA ✅
|
|
92
|
-
|
|
93
|
-
**Requirement:** All functionality that uses a dragging movement for operation can be achieved by a single pointer without dragging.
|
|
94
|
-
|
|
95
|
-
**Current Status:** ✅ **FULLY COMPLIANT**
|
|
96
|
-
|
|
97
|
-
**Player Components Analysis:**
|
|
98
|
-
|
|
99
|
-
#### **SortableList.svelte**
|
|
100
|
-
- ✅ Drag-and-drop: Supported
|
|
101
|
-
- ✅ **Alternative:** Full keyboard support
|
|
102
|
-
- `Space`/`Enter`: Pick up/drop item
|
|
103
|
-
- `Arrow keys`: Move item up/down (vertical) or left/right (horizontal)
|
|
104
|
-
- `Escape`: Cancel selection
|
|
105
|
-
- ✅ Screen reader announcements for all actions
|
|
106
|
-
|
|
107
|
-
#### **MatchDragDrop.svelte**
|
|
108
|
-
- ✅ Drag-and-drop: Supported
|
|
109
|
-
- ✅ **Alternative:** Full keyboard support
|
|
110
|
-
- `Space`/`Enter` on source: Select item
|
|
111
|
-
- `Tab` to target items
|
|
112
|
-
- `Space`/`Enter` on target: Create match
|
|
113
|
-
- `Escape`: Cancel selection
|
|
114
|
-
- ✅ Visual indication of selected state (`aria-pressed`, visual styling)
|
|
115
|
-
- ✅ Clear button (`✕`) to remove matches
|
|
116
|
-
|
|
117
|
-
#### **GraphicGapMatch.svelte**
|
|
118
|
-
- ⚠️ **Needs verification** - Image-based component may require specific keyboard patterns
|
|
119
|
-
- Should support: Select label → Tab to drop zone → Space/Enter to place
|
|
120
|
-
|
|
121
|
-
**Excellence:** Both SortableList and MatchDragDrop provide **equivalent keyboard alternatives** that don't just mimic dragging, but provide optimized keyboard workflows.
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
### 2.5.8 Target Size (Minimum) - Level AA ✅
|
|
126
|
-
|
|
127
|
-
**Requirement:** The size of the target for pointer inputs is at least 24×24 CSS pixels, with exceptions.
|
|
128
|
-
|
|
129
|
-
**Current Status:** ✅ **COMPLIANT**
|
|
130
|
-
|
|
131
|
-
**Player Components Analysis:**
|
|
132
|
-
|
|
133
|
-
#### **SortableList.svelte**
|
|
134
|
-
- List items: `p-3` padding (12px = 0.75rem) + content
|
|
135
|
-
- Minimum height: ~48px (exceeds 24px) ✅
|
|
136
|
-
- Full-width clickable area ✅
|
|
137
|
-
|
|
138
|
-
#### **MatchDragDrop.svelte**
|
|
139
|
-
- Source items: `p-3` padding, minimum height ~48-60px ✅
|
|
140
|
-
- Target zones: `p-3` padding, `min-h-[60px]` (60px minimum) ✅
|
|
141
|
-
- Clear button: `btn-xs` class
|
|
142
|
-
- DaisyUI `btn-xs`: `height: 1.5rem` (24px) ✅
|
|
143
|
-
- Adequate spacing between adjacent buttons ✅
|
|
144
|
-
|
|
145
|
-
#### **GraphicGapMatch.svelte**
|
|
146
|
-
- Drop zones: SVG-based, size depends on QTI XML coordinates
|
|
147
|
-
- ⚠️ **Needs verification:** Ensure drop zones are at least 24×24px
|
|
148
|
-
- May need to enforce minimum size or provide magnification
|
|
149
|
-
|
|
150
|
-
#### **InlineInteractionRenderer.svelte**
|
|
151
|
-
- Inline inputs: Standard form controls (browsers ensure minimum size) ✅
|
|
152
|
-
- Dropdown selects: Standard form controls ✅
|
|
153
|
-
|
|
154
|
-
**Exceptions Met:**
|
|
155
|
-
- Inline text inputs: Exception applies (essential for text entry)
|
|
156
|
-
- Spacing exception: Adequate spacing between all interactive elements
|
|
157
|
-
|
|
158
|
-
**Recommendation:** Add minimum size enforcement for GraphicGapMatch drop zones.
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
### 3.2.6 Consistent Help - Level A ✅
|
|
163
|
-
|
|
164
|
-
**Requirement:** If a help mechanism is provided on multiple pages, it occurs in a consistent relative order.
|
|
165
|
-
|
|
166
|
-
**Current Status:** ✅ **NOT APPLICABLE**
|
|
167
|
-
|
|
168
|
-
**Notes:**
|
|
169
|
-
- Player components do not provide help mechanisms
|
|
170
|
-
- Help/instructions are provided inline via:
|
|
171
|
-
- `aria-describedby` pointing to instruction text
|
|
172
|
-
- Screen reader announcements
|
|
173
|
-
- Keyboard shortcut reminders in `aria-label`
|
|
174
|
-
- Consistency is ensured through component design
|
|
175
|
-
- Consuming applications are responsible for page-level help mechanisms
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
### 3.3.7 Redundant Entry - Level A ✅
|
|
180
|
-
|
|
181
|
-
**Requirement:** Information previously entered by or provided to the user that is required to be entered again in the same process is either auto-populated or available for selection.
|
|
182
|
-
|
|
183
|
-
**Current Status:** ✅ **COMPLIANT**
|
|
184
|
-
|
|
185
|
-
**Player Components Analysis:**
|
|
186
|
-
- Player manages response state internally
|
|
187
|
-
- Previously selected/entered values are preserved
|
|
188
|
-
- QTI interactions don't typically require redundant entry
|
|
189
|
-
- Session persistence is handled by consuming application
|
|
190
|
-
|
|
191
|
-
**Examples:**
|
|
192
|
-
- **SortableList:** Order is maintained in component state
|
|
193
|
-
- **MatchDragDrop:** Matches persist until explicitly cleared
|
|
194
|
-
- **Text inputs:** Values persist unless explicitly cleared
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
|
-
### 3.3.8 Accessible Authentication (Minimum) - Level AA ✅
|
|
199
|
-
|
|
200
|
-
**Requirement:** A cognitive function test is not required for any step in an authentication process.
|
|
201
|
-
|
|
202
|
-
**Current Status:** ✅ **NOT APPLICABLE**
|
|
203
|
-
|
|
204
|
-
**Notes:**
|
|
205
|
-
- Player components do not implement authentication
|
|
206
|
-
- QTI assessment interactions are not authentication mechanisms
|
|
207
|
-
- Some QTI items may include CAPTCHA-like challenges (e.g., "Select all images with cars")
|
|
208
|
-
- These are assessment items, not authentication
|
|
209
|
-
- Excluded from this criterion per WCAG 2.2 definition
|
|
210
|
-
|
|
211
|
-
---
|
|
212
|
-
|
|
213
|
-
### 3.3.9 Accessible Authentication (Enhanced) - Level AAA ℹ️
|
|
214
|
-
|
|
215
|
-
**Requirement:** A cognitive function test is not required for any step in an authentication process (stricter than 3.3.8).
|
|
216
|
-
|
|
217
|
-
**Current Status:** ✅ **NOT APPLICABLE** (same as 3.3.8)
|
|
218
|
-
|
|
219
|
-
---
|
|
220
|
-
|
|
221
|
-
## Component-Specific Compliance Summary
|
|
222
|
-
|
|
223
|
-
### SortableList.svelte ✅ WCAG 2.2 Level AA Compliant
|
|
224
|
-
|
|
225
|
-
**Strengths:**
|
|
226
|
-
- ✅ Full keyboard support (2.5.7)
|
|
227
|
-
- ✅ Adequate target size (2.5.8)
|
|
228
|
-
- ✅ Focus visible and not obscured (2.4.11, 2.4.13)
|
|
229
|
-
- ✅ `aria-live` announcements for state changes
|
|
230
|
-
- ✅ Clear instructions via `aria-describedby`
|
|
231
|
-
- ✅ Proper ARIA roles: `role="list"`, `role="listitem"`
|
|
232
|
-
- ✅ `aria-grabbed` state for picked-up items
|
|
233
|
-
- ✅ Position information in `aria-label`
|
|
234
|
-
|
|
235
|
-
**WCAG 2.2 Specific:**
|
|
236
|
-
- ✅ 2.5.7 (Dragging Movements): Keyboard alternative provided
|
|
237
|
-
- ✅ 2.5.8 (Target Size): Items ~48px height
|
|
238
|
-
- ✅ 2.4.11 (Focus Not Obscured): Focus always visible
|
|
239
|
-
- ✅ 3.3.7 (Redundant Entry): State preserved
|
|
240
|
-
|
|
241
|
-
---
|
|
242
|
-
|
|
243
|
-
### MatchDragDrop.svelte ✅ WCAG 2.2 Level AA Compliant
|
|
244
|
-
|
|
245
|
-
**Strengths:**
|
|
246
|
-
- ✅ Full keyboard support (2.5.7)
|
|
247
|
-
- ✅ Adequate target size (2.5.8)
|
|
248
|
-
- ✅ Focus visible and not obscured (2.4.11, 2.4.13)
|
|
249
|
-
- ✅ `aria-live` announcements for matches
|
|
250
|
-
- ✅ Clear instructions via `aria-describedby`
|
|
251
|
-
- ✅ Proper ARIA roles: `role="button"`, `role="group"`
|
|
252
|
-
- ✅ `aria-pressed` state for selected sources
|
|
253
|
-
- ✅ Visual feedback for all states (selected, matched, hovering)
|
|
254
|
-
- ✅ Clear button for removing matches
|
|
255
|
-
|
|
256
|
-
**WCAG 2.2 Specific:**
|
|
257
|
-
- ✅ 2.5.7 (Dragging Movements): Keyboard matching workflow
|
|
258
|
-
- ✅ 2.5.8 (Target Size): Sources ~48-60px, targets 60px minimum, clear button 24px
|
|
259
|
-
- ✅ 2.4.11 (Focus Not Obscured): Focus always visible
|
|
260
|
-
- ✅ 3.3.7 (Redundant Entry): Matches preserved
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
### GraphicGapMatch.svelte ⚠️ Needs Verification
|
|
265
|
-
|
|
266
|
-
**Current Status:** Likely WCAG 2.1 compliant, WCAG 2.2 needs verification
|
|
267
|
-
|
|
268
|
-
**Potential Issues:**
|
|
269
|
-
- ⚠️ 2.5.7 (Dragging Movements): Need to verify keyboard support for SVG-based interactions
|
|
270
|
-
- ⚠️ 2.5.8 (Target Size): SVG drop zones may be smaller than 24×24px
|
|
271
|
-
- ⚠️ Image alternatives: Need to verify `<title>` or `aria-label` for SVG elements
|
|
272
|
-
|
|
273
|
-
**Recommended Actions:**
|
|
274
|
-
1. Audit GraphicGapMatch component for WCAG 2.2 specific criteria
|
|
275
|
-
2. Ensure minimum 24×24px drop zone size or provide zoom/magnification
|
|
276
|
-
3. Implement keyboard navigation for SVG-based gap matching
|
|
277
|
-
4. Add comprehensive ARIA labels for SVG elements
|
|
278
|
-
|
|
279
|
-
---
|
|
280
|
-
|
|
281
|
-
### InlineInteractionRenderer.svelte ✅ WCAG 2.2 Level AA Compliant
|
|
282
|
-
|
|
283
|
-
**Strengths:**
|
|
284
|
-
- ✅ Uses native form controls (browser handles accessibility)
|
|
285
|
-
- ✅ Proper label associations
|
|
286
|
-
- ✅ Keyboard navigable by default
|
|
287
|
-
- ✅ Focus management handled by browser
|
|
288
|
-
|
|
289
|
-
**WCAG 2.2 Specific:**
|
|
290
|
-
- ✅ 2.5.8 (Target Size): Native controls meet minimum size
|
|
291
|
-
- ✅ 2.4.11 (Focus Not Obscured): Inline rendering prevents obscuring
|
|
292
|
-
- ✅ 3.3.7 (Redundant Entry): Values preserved in component state
|
|
293
|
-
|
|
294
|
-
---
|
|
295
|
-
|
|
296
|
-
## Testing Recommendations
|
|
297
|
-
|
|
298
|
-
### Automated Testing
|
|
299
|
-
|
|
300
|
-
**Tools:**
|
|
301
|
-
- ✅ axe-core (via @axe-core/playwright or browser extension)
|
|
302
|
-
- ✅ WAVE browser extension
|
|
303
|
-
- ✅ Lighthouse accessibility audit
|
|
304
|
-
|
|
305
|
-
**What to Test:**
|
|
306
|
-
- Color contrast ratios (all themes)
|
|
307
|
-
- Focus indicator visibility
|
|
308
|
-
- ARIA attribute validity
|
|
309
|
-
- Keyboard navigation flow
|
|
310
|
-
- Target size measurements
|
|
311
|
-
|
|
312
|
-
**CI/CD Integration:**
|
|
313
|
-
```javascript
|
|
314
|
-
// Example playwright test
|
|
315
|
-
import { test, expect } from '@playwright/test';
|
|
316
|
-
import { injectAxe, checkA11y } from 'axe-playwright';
|
|
317
|
-
|
|
318
|
-
test('SortableList is accessible', async ({ page }) => {
|
|
319
|
-
await page.goto('/demo/order-interaction');
|
|
320
|
-
await injectAxe(page);
|
|
321
|
-
await checkA11y(page, '.sortable-list', {
|
|
322
|
-
detailedReport: true,
|
|
323
|
-
detailedReportOptions: { html: true },
|
|
324
|
-
});
|
|
325
|
-
});
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
### Manual Testing
|
|
329
|
-
|
|
330
|
-
**Required Tests:**
|
|
331
|
-
|
|
332
|
-
1. **Keyboard Navigation** (2.5.7, 2.4.11)
|
|
333
|
-
- Tab through all interactive elements
|
|
334
|
-
- Verify focus indicators are visible
|
|
335
|
-
- Test keyboard alternatives for drag-and-drop
|
|
336
|
-
- Verify Escape key cancels operations
|
|
337
|
-
|
|
338
|
-
2. **Screen Reader Testing** (4.1.2, 4.1.3)
|
|
339
|
-
- NVDA (Windows) + Firefox
|
|
340
|
-
- JAWS (Windows) + Chrome
|
|
341
|
-
- VoiceOver (macOS) + Safari
|
|
342
|
-
- Verify announcements for state changes
|
|
343
|
-
- Check ARIA label clarity
|
|
344
|
-
|
|
345
|
-
3. **Zoom and Magnification** (1.4.4, 1.4.10, 2.5.8)
|
|
346
|
-
- Test at 200% zoom (no horizontal scroll required)
|
|
347
|
-
- Verify target sizes at 320px viewport width
|
|
348
|
-
- Ensure touch targets are adequate on mobile
|
|
349
|
-
|
|
350
|
-
4. **Focus Management** (2.4.11, 2.4.13)
|
|
351
|
-
- Verify focus indicators meet 3:1 contrast
|
|
352
|
-
- Ensure focused elements are never obscured
|
|
353
|
-
- Test focus order is logical
|
|
354
|
-
|
|
355
|
-
5. **Color Contrast** (1.4.3, 1.4.11, 2.4.13)
|
|
356
|
-
- Test all DaisyUI themes
|
|
357
|
-
- Verify interactive elements meet 3:1 contrast
|
|
358
|
-
- Check focus indicators meet 3:1 contrast
|
|
359
|
-
- Disabled states should maintain 3:1 contrast
|
|
360
|
-
|
|
361
|
-
### User Testing
|
|
362
|
-
|
|
363
|
-
**Recommended:**
|
|
364
|
-
- Test with users who rely on keyboard navigation
|
|
365
|
-
- Test with screen reader users
|
|
366
|
-
- Test with users who have motor disabilities
|
|
367
|
-
- Focus areas: Drag-drop alternatives, complex interactions
|
|
368
|
-
|
|
369
|
-
---
|
|
370
|
-
|
|
371
|
-
## Priority Recommendations
|
|
372
|
-
|
|
373
|
-
### High Priority (Address Now)
|
|
374
|
-
|
|
375
|
-
1. ✅ **SortableList & MatchDragDrop** - Already compliant
|
|
376
|
-
2. ⚠️ **GraphicGapMatch WCAG 2.2 Audit**
|
|
377
|
-
- Verify 2.5.7 (keyboard alternative for dragging)
|
|
378
|
-
- Verify 2.5.8 (minimum target size 24×24px)
|
|
379
|
-
- Add keyboard support if missing
|
|
380
|
-
- Effort: 1-2 days
|
|
381
|
-
|
|
382
|
-
### Medium Priority (Soon)
|
|
383
|
-
|
|
384
|
-
3. **Theme Contrast Testing**
|
|
385
|
-
- Test all DaisyUI themes for WCAG 2.2 compliance
|
|
386
|
-
- Document which themes are WCAG 2.2 Level AA compliant
|
|
387
|
-
- Effort: 4-6 hours
|
|
388
|
-
|
|
389
|
-
4. **CI/CD Accessibility Testing**
|
|
390
|
-
- Integrate axe-core into test suite
|
|
391
|
-
- Add Playwright accessibility tests
|
|
392
|
-
- Effort: 1 day
|
|
393
|
-
|
|
394
|
-
### Low Priority (Nice to Have)
|
|
395
|
-
|
|
396
|
-
5. **Enhanced Focus Indicators (AAA)**
|
|
397
|
-
- Consider 4px focus indicators for extra visibility
|
|
398
|
-
- Add focus indicator customization options
|
|
399
|
-
- Effort: 2-3 hours
|
|
400
|
-
|
|
401
|
-
6. **Comprehensive Documentation**
|
|
402
|
-
- Add accessibility examples to README
|
|
403
|
-
- Document keyboard shortcuts
|
|
404
|
-
- Create accessibility testing guide for consumers
|
|
405
|
-
- Effort: 1 day
|
|
406
|
-
|
|
407
|
-
---
|
|
408
|
-
|
|
409
|
-
## Conclusion
|
|
410
|
-
|
|
411
|
-
**Overall Status:** QTI 2.2 Player components follow WCAG 2.2 Level AA guidelines, with one component requiring further verification:
|
|
412
|
-
|
|
413
|
-
### Components Following Guidelines (3/4):
|
|
414
|
-
- ✅ **SortableList.svelte** - Follows WCAG 2.2 Level AA guidelines
|
|
415
|
-
- ✅ **MatchDragDrop.svelte** - Follows WCAG 2.2 Level AA guidelines
|
|
416
|
-
- ✅ **InlineInteractionRenderer.svelte** - Follows WCAG 2.2 Level AA guidelines
|
|
417
|
-
|
|
418
|
-
### Needs Verification (1/4):
|
|
419
|
-
- ⚠️ **GraphicGapMatch.svelte** - Likely compliant, needs formal audit for:
|
|
420
|
-
- 2.5.7 (Dragging Movements)
|
|
421
|
-
- 2.5.8 (Target Size)
|
|
422
|
-
|
|
423
|
-
### Key Strengths:
|
|
424
|
-
1. **Excellent keyboard support** - All dragging has keyboard alternatives (2.5.7)
|
|
425
|
-
2. **Robust ARIA implementation** - Proper roles, states, and announcements (4.1.2, 4.1.3)
|
|
426
|
-
3. **Adequate target sizes** - All interactive elements ≥24×24px (2.5.8)
|
|
427
|
-
4. **Screen reader friendly** - Live regions and clear labels (4.1.3)
|
|
428
|
-
5. **Framework-agnostic** - Core Player and processors have no accessibility concerns
|
|
429
|
-
|
|
430
|
-
### Next Steps:
|
|
431
|
-
1. Audit GraphicGapMatch component (1-2 days)
|
|
432
|
-
2. Add automated accessibility tests to CI/CD (1 day)
|
|
433
|
-
3. Document accessibility features in README (1 day)
|
|
434
|
-
|
|
435
|
-
**Estimated effort to complete verification:** 3-4 days
|
|
436
|
-
|
|
437
|
-
---
|
|
438
|
-
|
|
439
|
-
## Resources
|
|
440
|
-
|
|
441
|
-
### WCAG 2.2 Documentation
|
|
442
|
-
- [WCAG 2.2 Specification](https://www.w3.org/TR/WCAG22/)
|
|
443
|
-
- [What's New in WCAG 2.2](https://www.w3.org/WAI/WCAG22/Understanding/)
|
|
444
|
-
- [Understanding WCAG 2.2](https://www.w3.org/WAI/WCAG22/Understanding/)
|
|
445
|
-
|
|
446
|
-
### Testing Tools
|
|
447
|
-
- [axe DevTools](https://www.deque.com/axe/devtools/)
|
|
448
|
-
- [axe-core](https://github.com/dequelabs/axe-core)
|
|
449
|
-
- [WAVE](https://wave.webaim.org/)
|
|
450
|
-
- [Lighthouse](https://developers.google.com/web/tools/lighthouse)
|
|
451
|
-
- [Color Contrast Analyzer](https://www.tpgi.com/color-contrast-checker/)
|
|
452
|
-
|
|
453
|
-
### ARIA Authoring Practices
|
|
454
|
-
- [WAI-ARIA Authoring Practices 1.2](https://www.w3.org/WAI/ARIA/apg/)
|
|
455
|
-
- [Drag and Drop Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dnd/)
|
|
456
|
-
- [Listbox Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/)
|
|
457
|
-
|
|
458
|
-
### QTI Accessibility
|
|
459
|
-
- [QTI 2.2 Accessibility Features](https://www.imsglobal.org/question/qtiv2p2/imsqti_infov2p2.html#section10002)
|
|
460
|
-
- [IMS Global Accessibility Guidelines](https://www.imsglobal.org/accessibility)
|
|
461
|
-
|
|
462
|
-
---
|
|
463
|
-
|
|
464
|
-
**Document Version:** 1.0
|
|
465
|
-
**Last Updated:** December 25, 2024
|
|
466
|
-
**Reviewed By:** Claude Code (Automated Analysis)
|