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.

autocomplete: ng-readonly w/ empty value still responds to clicks/focus and opens menu #11231

@Torinth

Description

@Torinth

Bug, feature request, or proposal:

Bug

What is the expected behavior?

md-autcomplete when ng-readonly is true should not allow modifications to text and should not open the drop down on click

What is the current behavior?

when ng-readonly is true
when value is not empty
typing, clicking all does nothing
when value is empty
typing does nothing
clicking improperly opens the drop down

CodePen and steps to reproduce the issue:

Detailed Reproduction Steps:

https://material.angularjs.org/1.1.8/demo/autocomplete
open code pen for basic demo
change ng-disabled to ng-readonly
click the checkbox to disable
click on auto complete
you will see the drop down incorrectly shows up
select any item
click on auto complete
you will see the drop down correctly does not show up

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

When ng-disabled is used you are not allowed to tab to the control meaning we cannot read aria values. ng-readonly gives same experience but allows you to tab into control for aria reading

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

1.1.8 all browsers

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

nope easy to repro in existing demo site

Metadata

Metadata

Assignees

Labels

P3: importantImportant issues that really should be fixed when possible.a11yThis issue is related to accessibilityhas: Pull RequestA PR has been created to address this issueresolution: fixedtype: bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions