Skip to content

Accessibility: Use <ScreenReaderText> in favor of aria-label #3096

@compulim

Description

@compulim

Version

4.8.0

Describe the bug

Support of aria-label in screen reader varies. It seems working when assigning to role="section", but not when role="group".

For texts that are intended for screen reader, we should use <ScreenReaderText> for offscreen rendering, instead of aria-label.

Steps to reproduce

  1. Turn on narrator
  2. Type "card breakfast" to the bot
  3. Press SHIFT + TAB
  4. Press up arrow button few times and listen to the narration

Expected behavior

The narration should be precise without lots of repetitives and without any missing information. It must speak activity text + timestamp.

Additional context

This article outline why offscreen texts are recommended over aria-label.

https://developer.paciellogroup.com/blog/2017/07/short-note-on-aria-label-aria-labelledby-and-aria-describedby/

[Bug]

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-accessibilitybugIndicates an unexpected problem or an unintended behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions