angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.28k stars 6.72k forks source link

bug(material/chips): clicking on an editable chip focuses it and does not begin editing but pressing enter begins the editing state #27106

Closed zarend closed 1 year ago

zarend commented 1 year ago

Is this a regression?

The previous version in which this bug was not present was

No response

Description

For editable chips, clicking on the chip and pressing enter do not have the same effect. Click on the chip focuses it and doesn't have any other side effects. To begin editing the chip, the user can either press enter or double click on it. Since htis is a butotn interaciton, I would expect enter and click to perform the action of the button. Since click and enter are not consistent, that means that the editable chip doesn't conform to the ARIA button interaciton pattern.

Double click is generally not available to Screen Readers and Assistive Technology.

Reproduction

Steps to reproduce:

  1. Navigate to "Chips with input" example on https://material.angular.io/components/chips/examples#chips-input
  2. (Demo appears with favorite fruits)
  3. Click on "Lemon"

Expected Behavior

A cursor appears after "Lemon" to indicate that it is in the editing state.

This is expected because that's what pressing enter does.

Actual Behavior

The background of "Lemon" darkens to indicated that it is focused

Environment

angular-automatic-lock-bot[bot] commented 1 year ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.