Skip to content

fix(material/chips): fix state layer interferring with text color #25892

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

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

zarend
Copy link
Contributor

@zarend zarend commented Oct 28, 2022

Fixes issue where state layer interfers with color of the text. Give the text label a higher z-index than the focus overlay.

@zarend zarend added Accessibility This issue is related to accessibility (a11y) area: material/chips target: rc This PR is targeted for the next release-candidate labels Oct 28, 2022
@zarend zarend force-pushed the mdc-chips-state-layer branch from 92b3722 to 120d651 Compare October 31, 2022 20:54
@zarend zarend marked this pull request as ready for review October 31, 2022 21:32
@zarend
Copy link
Contributor Author

zarend commented Oct 31, 2022

@crisbeto I've converted this to a real PR and it's ready for your eyes 👀

@zarend zarend requested a review from crisbeto November 1, 2022 22:07
@zarend zarend force-pushed the mdc-chips-state-layer branch from 120d651 to 43fc378 Compare November 2, 2022 15:33
Make focus overlay not affect the text color.

Give the text label a higher z-index than the focus overlay to ensure
that it does not affect the text color. Material spec requires that
state layer does not interfere with text color.

Fix issue where focus overlay would be on top of the text and darken the color
of the text. This is a deviation from spec and causes a11y issues due to
insufficient text contrast.
@zarend zarend force-pushed the mdc-chips-state-layer branch from 43fc378 to 6dc3476 Compare November 2, 2022 16:28
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@zarend zarend added the action: merge The PR is ready for merge by the caretaker label Nov 3, 2022
@zarend zarend added target: minor This PR is targeted for the next minor release target: patch This PR is targeted for the next patch release and removed target: rc This PR is targeted for the next release-candidate target: minor This PR is targeted for the next minor release labels Nov 15, 2022
@zarend zarend merged commit 29f6b6b into angular:main Nov 16, 2022
zarend added a commit that referenced this pull request Nov 16, 2022
Make focus overlay not affect the text color.

Give the text label a higher z-index than the focus overlay to ensure
that it does not affect the text color. Material spec requires that
state layer does not interfere with text color.

Fix issue where focus overlay would be on top of the text and darken the color
of the text. This is a deviation from spec and causes a11y issues due to
insufficient text contrast.

(cherry picked from commit 29f6b6b)
@zarend zarend deleted the mdc-chips-state-layer branch November 16, 2022 22:36
@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 Dec 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker area: material/chips target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants