Fix MCQ validation, styling, consistency, and add multi-group support#271
Open
elasticsounds wants to merge 3 commits intomainfrom
Open
Fix MCQ validation, styling, consistency, and add multi-group support#271elasticsounds wants to merge 3 commits intomainfrom
elasticsounds wants to merge 3 commits intomainfrom
Conversation
… support - Fix answer validation using strict boolean comparison instead of truthy check - Replace destructive className replacement with non-destructive classList toggling - Add self-healing for missing .activity-option and role="radiogroup" attributes - Add cross-page visual consistency pass via second LLM call - Simplify MCQ prompt to functional skeleton, giving LLM creative freedom - Add accessible feedback with opaque bg-white for WCAG AA contrast - Support multiple question groups per page with per-group tracking - Extract side effects into recordAttemptResult to fire once per submit
…, and localStorage restore fix - Add question structure analysis step to MCQ prompt so the LLM correctly identifies image-pair activities as N/2 independent binary-choice questions rather than 1 question with N options - Add image card option guidance for side-by-side binary comparison layout - Allow partial submission in multi-group mode: unanswered groups show the correct answer instead of blocking submit entirely - Fix localStorage restore bug: move restorePreviousSelection after the clone-to-remove-listeners step so selectedByGroup references point to live DOM nodes, not detached ones - Clarify multi-group answer generation in answer prompt
- Replace showFeedback (text in feedback-container) with showResultMark (✓/✗ badge overlaid on each option) for universal visual feedback - Add showInlineSummary banner at bottom of activity section with score display (e.g. "3 / 4") and try-again/correct messaging - Banner uses role="status" and aria-live="polite" for screen reader accessibility, stays visible until user changes a selection - Keep toast suppressed for MCQ — inline banner replaces it - Simplify cleanup functions to remove badges and banners
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
"false"was treated as truthy, causing all options to show as correctclassNamereplacement (setLetterAppearance) with non-destructiveclassListtoggling (setOptionState) to prevent layout instability when selecting/validating options.activity-optionclasses androle="radiogroup"attributes on LLM-generated HTMLbg-whitebackground for WCAG AA contrast compliancerecordAttemptResultso they fire once per submit, not once per groupTest plan