Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

feat(chips): support specifying the field to use as an identifier w/ a11y messages when using chips that are Objects #11536

Open
@Splaktar

Description

@Splaktar

Bug, enhancement request, or proposal:

Proposal

CodePen and steps to reproduce the issue:

CodePen Demo which demonstrates the issue:

https://material.angularjs.org/HEAD/demo/chips

Detailed Reproduction Steps:

  1. In the basic usage demo, interact with the last set of chips (custom template) while using a screen reader
  2. Also interact with the contact chips demo using a screen reader

What is the expected behavior?

We need to define an API which specifies the field in the chip Objects to use as the label and announcement text. In the case below, this would be something like md-chip-label-field="name". Please provide feedback or suggestions on this API if you have thoughts to share.

What is the current behavior?

Due to exceptions trying to parse objects with recursive references, we had to disable announcing or labeling object chips in #11535.

This means that for chips with Object arrays as models (instead of string arrays), we just announce removed or added when chips are removed or added instead of something like {"name":"Broccoli","type":"Brassica"} removed (which is read as name Broccoli type Brassica removed).

Also for aria-labels on existing chips, we only use Press delete to remove this chip. instead of {"name":"Broccoli","type":"Brassica"}. Press delete to remove this chip. when chips are based on Objects.

What is the use-case or motivation for changing an existing behavior?

a11y

Which versions of AngularJS, Material, OS, and browsers are affected?

  • AngularJS: 1.1.11
  • AngularJS Material: 1.7.5
  • OS: macOS
  • Browsers: Chrome

Is there anything else we should know? Stack Traces, Screenshots, etc.

Metadata

Metadata

Assignees

Labels

P3: importantImportant issues that really should be fixed when possible.a11yThis issue is related to accessibilitytype: enhancement

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions