lime-elements icon indicating copy to clipboard operation
lime-elements copied to clipboard

ListItem: allow description only shown to assistive tech (like screen readers)

Open adrianschmidt opened this issue 2 years ago • 0 comments

New feature motivation

In menus and picker actions, we sometimes use a very short description for an action, that may only make sense in combination with the supplied icon, like ⊕ Person for example, to indicate that a new person object can be created:

image

However, this isn't good enough for a visually impaired user.

New feature description

We want the ability to provide an alternative description, specifically meant for assistive tech, like screen readers, but not visually rendered on screen.

New feature implementation

We need to add a new optional property to the ListItem interface, perhaps called something like assistiveDescription. When supplied for a given ListItem, there should be no visual changes to the item, but the provided text should be made available to screen readers.

I think we will also want to hide the elements containing the text and secondaryText from screen readers (with the no-speak css property for example), so that, when supplied, the assistiveDescription alone is responsible for non-visual communication with the user. Note that it's very important that we do not hide the text and secondaryText from screen readers if assistiveDescription is not supplied.

adrianschmidt avatar Apr 06 '22 10:04 adrianschmidt