BotFramework-WebChat icon indicating copy to clipboard operation
BotFramework-WebChat copied to clipboard

fix ARIA role of transcript when connection is pending

Open beyackle2 opened this issue 3 years ago • 1 comments

Fixes #4393

Changelog Entry

Description

The ARIA role of the transcript was incorrectly set when the connection was pending; this is what aria-busy is meant for, so we needed to incorporate awareness of the connection status into the transcript.

Specific Changes

  • Added "isWaiting" to BasicTranscript to see if the user is waiting for a connection
  • Wired this prop through to both places that needed it
  • [ ] I have added tests and executed them locally
  • [x] I have updated CHANGELOG.md

Review Checklist

This section is for contributors to review your work.

  • [ ] Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • [ ] Tests reviewed (coverage, legitimacy)

beyackle2 avatar Sep 20 '22 21:09 beyackle2

CLA assistant check
All CLA requirements met.

ghost avatar Sep 20 '22 21:09 ghost

image

Looks like aria-busy="true" won't help with the accessibility issue. Few things we could try:

  • Change role to something else until the first message come
  • Inject an invisible "the chat history is empty" in the transcript before the first message

compulim avatar Oct 23 '22 22:10 compulim

@beyackle2 Few things I changed:

  • Now, it renders <section role="feed"> if there are any contents
  • For tests, I am adding this DOM integrity test to verifyDOMIntegrity.js, which is a tiny version of axe-core
    • Ultimately, we should use axe-core and replace verifyDOMIntegrity.js (outlined in #3716)
    • However, axe-core is using a non-MIT license so we need to do something extra before using it
    • Thus, we have the tiny verifyDOMIntegrity.js as a stopgap for now

Please let me know if it looks good to you.

compulim avatar Oct 28 '22 06:10 compulim