Catbot

An unassuming chatbot that responds to any message with a randomly-chosen cat fact from Wikipedia.

The message list is a focusgroup="toolbar block nomemory" with role="feed" applied on top, since there are no out-of-the-box semantics that exactly fit a chat message list. This example also demonstrates using focusgroupstart to manually handle memory with the exception of updating to the latest message when a new one arrives.

focusgroup="toolbar block nomemory"
Try it: Use and to navigate. Press Tab when on a specific message to reach its actions toolbar, or any links within the message. Try typing a new message into the input and tabbing back to the message list to see the latest catbot response focused.
View source
<div focusgroup="toolbar block nomemory"
     aria-label="Chat with catbot"
     role="feed" id="message-list">
  <div class="message user" role="article" tabindex="0">
    When were cats domesticated?
  </div>
  <div class="message catbot" role="article" tabindex="0" focusgroupstart>
    <div class="message-actions" focusgroup="toolbar nomemory">
      <button>Copy</button>
      <button>Like</button>
      <button>Dislike</button>
      <button>Share</button>
    </div>
    The domestic cat is the only domesticated species of the family Felidae.
    Advances in archaeology and genetics have shown that the domestication of the cat
    started in the Near East around 7500 BCE.
  </div>
</div>