Make QTI answer options a semantic list and pin reorder accessibility - #6125
Merged
AlexVelezLl merged 2 commits intoSep 1, 2026
Merged
Conversation
DragSortWidget announces the move and restores focus; nothing pinned that the Choice and Ordering editors keep feeding it itemLabel/position/total, or that a re-key on reorder does not destroy the row and drop focus to <body>. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
rtibblesbot
force-pushed
the
issue-6091-500144
branch
2 times, most recently
from
September 1, 2026 16:41
34e302b to
40fb9c6
Compare
The Choice editor rendered its options as divs, so screen readers conveyed neither list size nor an option's position. Adopt Ordering's <ol>/<li>. role="group"/"radiogroup" override an element's implicit list role, so grouping moves to a wrapper outside DraggableRegion and the <ol> becomes the region's slot root — SortableJS sorts its direct children, which are now the <li> rows. role="list" is explicit on both editors' lists: list-style: none drops the implicit role in Safari. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
rtibblesbot
force-pushed
the
issue-6091-500144
branch
from
September 1, 2026 16:47
40fb9c6 to
9a2b84d
Compare
rtibblesbot
marked this pull request as ready for review
September 1, 2026 16:48
AlexVelezLl
approved these changes
Sep 1, 2026
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
Screen reader users authoring a Choice question could not tell how many answer options there were or which position one sat in — the options rendered as unstructured
<div>s. They now use<ol>/<li>markup like the Ordering editor, with the radiogroup/group role moved onto a wrapper so it no longer overrides the list role. Reordering already announced the new position and kept focus on the moved item's button; both are now pinned by tests in each editor.References
Fixes #6091. Ordering editor this follows: #6089.
Reviewer guidance
On the QTI demo page (
/channels/<id>/#/qti-demo), question 1 is Single Choice, question 6 is Ordering:<ol>rather than the wrapper it bound to before.Open risks:
role="list"is explicit on both<ol>s becauselist-style: nonedrops the implicit role in Safari; I verified the markup in Chromium only.role="radiogroup"for single-select, duplicating whatKRadioButtonGroup's own root sets. Bindingundefinedinstead — the obvious alternative — leaves the key in the vnode's attrs and Vue's next patch strips the child's role; jsdom does not reproduce that, so no test guards the wrapper against being "cleaned up" back toundefined.axe-core AA audit of the demo page in edit mode: one serious
color-contrastviolation onAddListItemButton's label, outside this diff and untouched by it.AI usage
Used Claude Code to investigate the three acceptance criteria, write the tests and restructure the Choice markup, following the Ordering editor as the reference pattern; I directed the scope and reviewed the output. Verified with the Jest suite, pre-commit, and manual QA in Chromium covering keyboard reorder, live-region announcements and mouse drag.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
🟡 Waiting for feedback
Last updated: 2026-09-01 16:48 UTC