Skip to content

Commit

Permalink
Add role="group" to transcript focusable (#3765)
Browse files Browse the repository at this point in the history
  • Loading branch information
compulim authored Feb 25, 2021
1 parent bebe817 commit 63bb97a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixes [#3747](https://github.com/microsoft/BotFramework-WebChat/issues/3747). `aria-pressed` and `aria-role` is not properly set on Adaptive Cards submit buttons, by [@amal-khalaf](https://github.com/amal-khalaf) in PR [#3744](https://github.com/microsoft/BotFramework-WebChat/pull/3744)
- Fixes [#3750](https://github.com/microsoft/BotFramework-WebChat/issues/3750). Debump Node.js engines requirements for some packages to `12.0.0`, by [@compulim](https://github.com/compulim) in PR [#3753](https://github.com/microsoft/BotFramework-WebChat/pull/3753)
- Fixes [#3760](https://github.com/microsoft/BotFramework-WebChat/issues/3760). Use `<ErrorBoundary>` to wrap around attachment renderer, by [@compulim](https://github.com/compulim) in PR [#3761](https://github.com/microsoft/BotFramework-WebChat/pull/3761)
- Fixes [#3764](https://github.com/microsoft/BotFramework-WebChat/issues/3764). Added `role="group"` to the focusable transcript to enable `aria-activedescendant`, by [@compulim](https://github.com/compulim) in PR [#3765](https://github.com/microsoft/BotFramework-WebChat/issues/3765)

### Changed

Expand Down
3 changes: 3 additions & 0 deletions packages/component/src/BasicTranscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,9 @@ const InternalTranscript = ({ activityElementsRef, className }) => {
onKeyDown={handleTranscriptKeyDown}
onKeyDownCapture={handleTranscriptKeyDownCapture}
ref={rootElementRef}
// "aria-activedescendant" will only works with a number of roles and it must be explicitly set.
// https://www.w3.org/TR/wai-aria/#aria-activedescendant
role="group"
// For up/down arrow key navigation across activities, this component must be included in the tab sequence.
// Otherwise, "aria-activedescendant" will not be narrated when the user press up/down arrow keys.
// https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant
Expand Down

0 comments on commit 63bb97a

Please sign in to comment.