kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Label-image markers in read-only Perseus questions can be changed by keyboard

Open rtibblesbot opened this issue 1 week ago • 0 comments

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Target branch: develop

Observed behavior

  • In a read-only Perseus question, a label-image marker takes keyboard input: Tab focuses it, Enter opens its list, Enter again selects a label.
  • Mouse input is blocked. Perseus lays an overlay over a read-only widget, and the overlay stops pointer events only.
  • Kolibri sets apiOptions.readOnly from interactive: PerseusRendererIndex.vue#L533.
  • Reproduced in headless Chromium on ServerItemRenderer from @khanacademy/perseus 78.2.0 with apiOptions.readOnly: true, on "Make bar graphs", Q15 (Kolibri QA Channel, node 7c34b5bfa4f5459f98c49f5e638e63db, assessment item 5076d6c8a4a65a898e76fc9c8f45d35b): the first marker's selection went from empty to ["Pecans"].
  • Perseus fixed this in 93.1.0: Khan/perseus#4495 disables the markers when the widget is static or read-only.
  • With Show correct answer checked the markers are already disabled.

User-facing consequences

  • A coach or learner reading a quiz report by keyboard can change the labels shown for a learner's attempt. Nothing is saved; the report shows the wrong answer until the question is rendered again.
  • A screen reader announces the markers as enabled comboboxes in a report nobody can edit.

Steps to reproduce

  1. Import "KA Perseus > Make bar graphs" from the Kolibri QA Channel and add its questions to a quiz.
  2. As a learner, answer the quiz and submit it.
  3. As a coach, open Coach > Quizzes > <quiz> > <learner> and select a "Make bar graphs" question. Leave Show correct answer unchecked.
  4. Press Tab until a marker on the bar graph has focus.
  5. Press Enter, choose another label with the arrow keys, and press Enter.

Context

  • release-v0.20.x pins @khanacademy/perseus 78.2.0; develop pins 87.2.2. Both predate 93.1.0.
  • Two hosts pass :interactive="false" without forcing Show correct answer: QuizReport/index.vue#L171 and QuestionLearnersPage.vue#L66.
  • Found while building the viewer sandbox for #15950, where the same question shows it with Interactive off.

Acceptance Criteria

  • [ ] With interactive false and Show correct answer unchecked, pressing Enter on a focused label-image marker opens no list and leaves the marker's selection unchanged.
  • [ ] With interactive true, a marker still opens and takes a selection by keyboard and by mouse.
  • [ ] A test through the mounted Perseus renderer covers both.

AI usage

Claude Code wrote this issue while working on #15950. It ran the Chromium reproduction and read the Perseus fix.

rtibblesbot avatar Nov 25 '26 13:11 rtibblesbot