fix(conversation-thread): target latest turn on prompt re-entry#6237
fix(conversation-thread): target latest turn on prompt re-entry#6237TarunAdobe wants to merge 2 commits intomainfrom
Conversation
|
ec048ba to
cd65117
Compare
📚 Branch Preview Links🔍 First Generation Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
Description
Updates
swc-conversation-threadroving focus behavior so newly appended conversation turns become the next tab stop when focus is outside the thread. This lets users submit a prompt, wait for the generated response, and useShift+Tabfrom the prompt field to return directly to the newestswc-conversation-turnwithout focus being moved while they are typing.Also updates
swc-conversation-turnaccessibility semantics so the focused host element exposesrole="group"and an accessible label such as “User message” or “System message”.Motivation and context
Roving tabindex made it easy to move between turns with arrow keys, but the active tab stop could stay on a previously focused turn. After submitting a new prompt,
Shift+Tabfrom the prompt field could return to an older turn instead of the newly generated response.This change keeps focus stable while the user is in the prompt field, but updates the thread’s next re-entry target to the latest appended turn. It also ensures the element receiving roving focus has an accessible role and name.
Related issue(s)
Screenshots (if appropriate)
N/A
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
swc-conversation-threadreturns to the newest generated turn from the prompt fieldswc-conversation-turnelements withArrowUpandArrowDown.Tabto move focus to the prompt field.Shift+Tab.swc-conversation-turn.RTI updates do not steal focus from the prompt field
Shift+Tab.Device review
Accessibility testing checklist
Required: Complete each applicable item and document your testing steps (replace the placeholders with your component-specific instructions).
Keyboard (required — document steps below) — What to test for: Focus order is logical; Tab reaches the component and all interactive descendants; Enter/Space activate where appropriate; arrow keys work for tabs, menus, sliders, etc.; no focus traps; Escape dismisses when applicable; focus indicator is visible.
Tabto enter the thread andArrowUp/ArrowDownto move between turns.HomeandEndto jump to the first and last turn.Tabto move to the prompt field.Shift+Tab.Screen reader (required — document steps below) — What to test for: Role and name are announced correctly; state changes (e.g. expanded, selected) are announced; labels and relationships are clear; no unnecessary or duplicate announcements.
swc-conversation-turnto expose a group role and an accessible label such as “User message” or “System message”.Shift+Tabfrom the prompt field.