Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material/input): preserve native placeholder on non-legacy appearances #20936

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

crisbeto
Copy link
Member

The legacy form field appearance has a feature where it promotes the input placeholder to the form field label which introduces a problem where screen readers will read out the placeholder twice. Some time ago we added logic to clear the placeholder, but it seems to be a bit too aggressive since it also clears the placeholder for other appearances.

These changes scope the workaround only to the case when a placeholder would be promoted to a label.

Fixes #20903.

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Oct 30, 2020
@crisbeto crisbeto requested a review from mmalerba as a code owner October 30, 2020 16:22
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 30, 2020
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mmalerba mmalerba added the action: merge The PR is ready for merge by the caretaker label Oct 30, 2020
@Shiva7071007
Copy link

Any update on this one when this will get merged?

@crisbeto crisbeto force-pushed the 20903/placeholder-preserve branch from 6ed537d to 50e7344 Compare September 7, 2021 20:49
@andrewseguin andrewseguin removed the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 28, 2021
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 29, 2021
@andrewseguin
Copy link
Contributor

Has CI failures

@crisbeto crisbeto force-pushed the 20903/placeholder-preserve branch from 50e7344 to 6412faf Compare February 28, 2022 06:22
@crisbeto crisbeto requested a review from devversion as a code owner February 28, 2022 06:22
@crisbeto crisbeto force-pushed the 20903/placeholder-preserve branch from 6412faf to be89dcd Compare February 28, 2022 09:35
@devversion devversion removed their request for review March 5, 2022 09:08
…ances

The `legacy` form field appearance has a feature where it promotes the input placeholder
to the form field label which introduces a problem where screen readers will read out
the placeholder twice. Some time ago we added logic to clear the placeholder, but
it seems to be a bit too aggressive since it also clears the placeholder for other
appearances.

These changes scope the workaround only to the case when a placeholder would be promoted to a label.

Fixes angular#20903.
@crisbeto crisbeto force-pushed the 20903/placeholder-preserve branch from be89dcd to d84c2f6 Compare March 16, 2022 09:50
@crisbeto crisbeto added target: major This PR is targeted for the next major release and removed target: patch This PR is targeted for the next patch release labels Mar 18, 2022
@crisbeto crisbeto merged commit 6b2b518 into angular:master Mar 18, 2022
forsti0506 pushed a commit to forsti0506/components that referenced this pull request Apr 3, 2022
…ances (angular#20936)

The `legacy` form field appearance has a feature where it promotes the input placeholder
to the form field label which introduces a problem where screen readers will read out
the placeholder twice. Some time ago we added logic to clear the placeholder, but
it seems to be a bit too aggressive since it also clears the placeholder for other
appearances.

These changes scope the workaround only to the case when a placeholder would be promoted to a label.

Fixes angular#20903.
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(Form Field): Legacy form field input missing placeholder attribute
5 participants