Skip to content

bug: The WebChat container's role should not always be 'complementary' [screen reader accessibility] #3658

@nfreear

Description

@nfreear

Hi,

Screenshots

Version

Describe the bug

Sometimes a Chat-bot will be additional content on the Web-page, set apart from the main content. However, other times a Chat-bot will be the only or main focus of the Web-page.

In these cases role=complementary is not appropriate, and will confuse screen reader users, who may rely on landmark roles for navigation.

Steps to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Give implementors / developers the option to modify the container-role via defaultStyleOptions.js:

 containerRole: 'complementary', // WAI-ARIA landmark role. Suggestions: 'complementary' or 'region'. Defaults to 'complementary'.

The value would be used in :~ https://github.com/microsoft/BotFramework-WebChat/blob/v4.11.0/packages/component/src/BasicWebChat.js#L71;

For example, role={containerRole}:

 return ( <AccessKeySinkSurface ... ... > <TypeFocusSinkBox className={sinkClassName} disabled={disabled} ref={transcriptFocusRef} role={containerRole} sendFocusRef={sendBoxFocusRef} > // ... </TypeFocusSinkBox> </AccessKeySinkSurface> );

Please let me know what you think of this proposal.

Yours,

Nick

Additional context

[Bug]

Metadata

Metadata

Labels

Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.ExemptFromDailyDRIReportexempt from daily DRI reportarea-accessibilitybugIndicates an unexpected problem or an unintended behavior.customer-replied-toRequired for internal reporting. Do not delete.customer-reportedRequired for internal Azure reporting. Do not delete.needs-team-attentionp0Must Fix. Release-blocker

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions