Skip to content

Warn authors when a QTI question has more than 5 options - #6356

Open
rtibblesbot wants to merge 1 commit into
learningequality:unstablefrom
rtibblesbot:issue-6345-399c27
Open

rtibblesbot wants to merge 1 commit into
learningequality:unstablefrom
rtibblesbot:issue-6345-399c27

Conversation

@rtibblesbot

@rtibblesbot rtibblesbot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Option, item, pair, row, distractor and dropdown-option lists warn past 5 entries.
  • Non-blocking, styled and announced like the single-option warning.
  • Simultaneous warnings (e.g. associate pairs and distractors) announce as one message.

References

Closes #6345. Related: #6316.

Reviewer guidance

Suggested review: Full code review, then manual QA once the reviewer sets Needs QA.

  • User-visible files changed: contentcuration/contentcuration/frontend/shared/views/QTIEditor/components/ValidationMessage/index.vue, contentcuration/contentcuration/frontend/shared/views/QTIEditor/constants.js, contentcuration/contentcuration/frontend/shared/views/QTIEditor/interactions/associate/Editor.vue, contentcuration/contentcuration/frontend/shared/views/QTIEditor/interactions/choice/Editor.vue, contentcuration/contentcuration/frontend/shared/views/QTIEditor/interactions/inlineChoice/Editor.vue….
  • Decide whether shared ValidationMessage should keep its module-level queue, which defers every QTI warning announcement by one frame, including the existing single-option one, and lets it override an order announcement sent in that frame.
  • Decide whether a closed inline choice chip with more than 5 options should show the warning, since only its open options panel does.
  • With a screen reader, check that associate/match with both lists over 5 reads both warnings, and that the inline choice warning is still heard after focus moves to the new 6th option.
  • No real screen reader run.

Manual QA

QA team: question editors warn past 5 list entries. Screen reader announcements are the most probable regression.

Requires: a screen reader and an exercise's Questions tab.

  1. Single Choice. Make a question with 6 options. Click "Close".
    • Click "Edit". "Questions with more than 5 options can be harder for learners to follow…" is read one time.
    • Click "Delete choice" until 1 option is left. Only "This question has only one answer option…" is read, one time.
    • Click "Add choice" until there are 6 options. The more-than-5 warning is read one time.
    • Click "Delete choice" on option 6. Nothing is read.
  2. Associate and Match. Add 6 pairs or rows and 6 distractors. Each list shows its warning until it has 5.
  3. Inline choice. Make dropdowns with 6 and 5 options. Only the 6-option panel shows the warning.

Look out for:

  • Reopen an Associate question with 6 pairs and 6 distractors. Look out for one of the two warnings not read.

Ordering, Multi select, "Show answers" and saving were verified.

Evidence

Single choice: 5 → 6 → 5 options

Step Screenshot
5 options: no warning 5 options: no warning
6 options: warning above "Answer options" 6 options: options warning above "Answer options"
Closed with 6 options: saved, no error Closed with 6 options: saved, no error

Single choice announcements: 2 → 1 → 6 → 5 options, close and reopen

single-choice-announcements.webm
  • Live region: each warning read once; none for a 6th option removed or closed in the same frame; the next 6th option is read.
More captures (27)
Step Screenshot
Multi select, 6 options: warning below "Choose a correct answer" Multi select, 6 options: warning below "Choose a correct answer"
Multi select, two correct: warning only Multi select, two correct: warning only
Multi select, Show answers: no warning Multi select, Show answers: no warning
Ordering, 6 items, Show answers: no warning Ordering, Show answers with 6 items: no warning
Ordering, saved: no error Ordering, saved: Questions tab with no error
Associate, 6 pairs: pairs warning Associate, 6 pairs: pairs warning
Associate, 6 pairs and 6 distractors: both warnings Associate, 6 pairs and 6 distractors: both warnings
Associate, Show answers: no pairs warning Associate, Show answers: no pairs warning
Match, 6 rows: rows warning Match, 6 rows: rows warning
Match, 6 rows and 6 distractors: both warnings Match, 6 rows and 6 distractors: both warnings
Match, distractor 6 deleted: rows warning stays Match, distractor 6 deleted: rows warning stays
Match, closed: no warnings Match, closed: no warnings
Match, Show answers: no warning Match, Show answers: no warning
Inline choice panel, 5 options: no warning Inline choice panel, 5 options: no warning
Inline choice panel, 6 options: dropdown warning Inline choice panel, 6 options: dropdown warning
Inline choice, second dropdown at 5: no warning Inline choice, second dropdown at 5: no warning
Inline choice panel, empty option error Inline choice panel, empty option error
Inline choice panel, duplicate error plus warning Inline choice panel, duplicate error with warning
Inline choice, reopened after undo: dropdown-level error Inline choice, reopened after undo: dropdown-level error
Inline choice, closed and saved Inline choice, closed and saved
Single choice, 1 option: single-option warning Single choice, 1 option: single-option warning
Single choice, reopened with 6 options: options warning Single choice, reopened with 6 options: options warning

Single choice 1 → 2 → 1 → 6 options:

s3-single-choice-1-2-1-6-options.webm

Multi select close, save, reopen:

multi-select-close-save-reopen.webm

Ordering 5 → 6 → 5 items:

ordering-add-6th-remove-to-5.webm

Associate, delete distractor then pair:

s5-associate-remove-distractor-then-pair.webm

Inline choice panel add, remove, reorder:

inline-panel-add-remove-reorder.webm

AI usage

Claude Code wrote the warnings and tests; verified with editor Jest suites, pre-commit, and headless-Chromium screenshots plus axe.


Written by rtibblesbot, an LLM-based coding agent.

@rtibblesbot

🟡 Waiting for feedback

Last updated: 2026-10-30 11:50 UTC

- Choice, ordering, associate, match and inline choice editors show a
  non-blocking warning past 5 options, pairs, rows or distractors
- ValidationMessage announces warnings appearing in the same frame together,
  after drag-sort's frame-deferred order announcement; its `alert` prop is
  renamed `announce` and now gates warnings too

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rtibblesbot
rtibblesbot marked this pull request as ready for review October 30, 2026 05:28
@rtibblesbot
rtibblesbot requested review from a team and leq-bot October 30, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QTI] Warn authors when a question has more than 5 options

1 participant