Command Palette

Search for a command to run...

Hectal
Phase 10: AI Product UX
AI Frontend · Exercise 3 of 5 PreviousNext
Intermediate

Announce a Stream Once

#ask starts a streamed answer into #log. Make the page screen-reader friendly. #log must have role="log" and an aria-label. While the answer streams it must have aria-busy="true", and when the stream ends aria-busy="false".

#status must be a role="status" element that says Mitra is answering. while the stream runs and Answer ready. when it ends. Release aria-busy even when the stream fails.

What Check tests

  1. #log has role="log" and a non-empty aria-label
  2. #status has role="status"
  3. While the stream runs, #log is aria-busy="true" and the status says Mitra is answering.
  4. When the stream ends, aria-busy is false and the status says Answer ready.
  5. The answer is complete

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.