opened
JoeMellon
username_0
#### Reproduction

Legacy form-field appearance from Material examples: https://stackblitz.com/angular/bqmpxokjgve?file=src%2Fapp%2Fform-field-appearance-example.html

Steps to reproduce:
1. View example above
2. Inspect input element from legacy form field example
 
 
#### Expected Behavior

`placeholder` attribute to be available in the dom


#### Actual Behavior

`placeholder` attribute missing from the dom

#### Environment
![missing-placeholder-att](https://user-images.githubusercontent.com/20834865/97450879-17e36a00-192b-11eb-8daf-e49f17bd5b3b.png)

- Angular: 10.2.0
- CDK/Material: 10.2.6
- Browser(s): Chrome / Edge
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
bug(Form Field): LEGACY FORM FIELD MISSIN PLACEHOLDER ATTRIBUTE
issue
created
crisbeto
username_1
For context, the form field with the `legacy` appearance has a feature where it turns the `placeholder` into the form field label, if the form field doesn't have have a `mat-label` element. This is a problem for screen readers, because they'll read out the same label twice on focus. In order to resolve the accessibility issue, a couple of months ago we started removing the `placeholder` from the DOM completely. 

That being said, we might've been a bit too aggressive. Right now we're using the `_hideControlPlaceholder` method which hides the placeholder when the label isn't floating. We should make it so the logic only runs for the `legacy` appearance and if there isn't a `mat-label`.
comment
closed
crisbeto
username_1
issue