What element to focus after user input on a chatbot?
This is similar to What element should have the focus after a search?, but not the same case.
I'm building a chatbot with Flutter (mobile). This is the flow:
- Bot asks a question.
- User is presented with several fixed options (like radio buttons)
- User chooses one of them
- String equivalent answer is added to the chat log
- Options disappear, since they made sense only for question in point 1
- Bot asks new question
- User is presented with new options.
I want to make this accessible. I've taken a look at role log
and it fits great. I'm using a similar equivalent in Flutter and it handles new messages perfectly. The problem is that, since options disappear with each answer, focus disappears too: when the user "tabs" to the next element, focus goes back to the top of the app, and she'd need to scroll back all the list of messages (or find her way with an equivalent but also suboptimal manner) to get to the end, every time.
I can force the focus moving to the last message, but that would clash with the message reading, since that won't be "polite" (ARIA sense).
For now, I'm not using the aria-live feature (so the app doesn't read new messages) and I'm moving the focus manually, only after the user submits the info and only to the first unread message. It works, but I find that solution kind of hacky.
What should be the best way to handle this?