kolibri
kolibri copied to clipboard
Label-image markers in read-only Perseus questions can be changed by keyboard
❌ 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.readOnlyfrominteractive:PerseusRendererIndex.vue#L533. - Reproduced in headless Chromium on
ServerItemRendererfrom@khanacademy/perseus78.2.0 withapiOptions.readOnly: true, on "Make bar graphs", Q15 (Kolibri QA Channel, node7c34b5bfa4f5459f98c49f5e638e63db, assessment item5076d6c8a4a65a898e76fc9c8f45d35b): 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
- Import "KA Perseus > Make bar graphs" from the Kolibri QA Channel and add its questions to a quiz.
- As a learner, answer the quiz and submit it.
- As a coach, open Coach > Quizzes > <quiz> > <learner> and select a "Make bar graphs" question. Leave Show correct answer unchecked.
- Press Tab until a marker on the bar graph has focus.
- Press Enter, choose another label with the arrow keys, and press Enter.
Context
release-v0.20.xpins@khanacademy/perseus78.2.0;developpins 87.2.2. Both predate 93.1.0.- Two hosts pass
:interactive="false"without forcing Show correct answer:QuizReport/index.vue#L171andQuestionLearnersPage.vue#L66. - Found while building the viewer sandbox for #15950, where the same question shows it with Interactive off.
Acceptance Criteria
- [ ] With
interactivefalse and Show correct answer unchecked, pressing Enter on a focused label-image marker opens no list and leaves the marker's selection unchanged. - [ ] With
interactivetrue, 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.