Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

feat: add cookie popup #988

Merged
merged 1 commit into from
May 26, 2021
Merged

feat: add cookie popup #988

merged 1 commit into from
May 26, 2021

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented May 22, 2021

Due to legal requirements we have to have a cookie disclaimer popup. It is always shown until the user agrees to it. After the user has agreed, the popup won't be shown on subsequent sessions.

Fixes angular/components#22746.

Note: currently this doesn't have any accessibility treatment, because I'm not sure what the correct approach would be. I assume that we'd have to move focus into the cookie popup since it has more than one button, but its role is currently either status or alert which may not make sense to receive focus and to contain buttons.

Angular_Material_UI_component_library_-_Google_Chr_2021-05-22_08-44-27

@crisbeto crisbeto requested a review from jelbourn May 22, 2021 05:46
@google-cla google-cla bot added the cla: yes label May 22, 2021
@crisbeto crisbeto force-pushed the cookie-popup branch 3 times, most recently from 23e18b2 to bb35d79 Compare May 22, 2021 07:03
@crisbeto
Copy link
Member Author

@jelbourn I've reworked it based on our discussion.

'accessibility': 100
// We lose a few points on accessibility, because there isn't quite enough contrast on the
// buttons in the cookie popup. This is a known issue with the Material Design theming system.
'accessibility': 98
Copy link
Member

Choose a reason for hiding this comment

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

Can we tweak the colors to avoid dinging this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. It looks like I only had to darken the original color by 5%.

Due to legal requirements we have to have a cookie disclaimer popup. It is always shown until the user agrees to it. After the user has agreed, the popup won't be shown on subsequent sessions.

Fixes angular/components#22746.
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn merged commit 0b39011 into angular:master May 26, 2021
gkalpak added a commit to gkalpak/angular that referenced this pull request Jun 12, 2021
This commit adds a popup to angular.io to inform the user about the use
of cookies. Once the user confirms having read the info, the popup will
not be shown on subsequent visits.

This commit is partly based on angular/material.angular.io#988.

Fixes angular#42209
alxhub pushed a commit to angular/angular that referenced this pull request Jun 14, 2021
…42259)

This commit adds a popup to angular.io to inform the user about the use
of cookies. Once the user confirms having read the info, the popup will
not be shown on subsequent visits.

This commit is partly based on angular/material.angular.io#988.

Fixes #42209

PR Close #42259
alxhub pushed a commit to angular/angular that referenced this pull request Jun 14, 2021
…42259)

This commit adds a popup to angular.io to inform the user about the use
of cookies. Once the user confirms having read the info, the popup will
not be shown on subsequent visits.

This commit is partly based on angular/material.angular.io#988.

Fixes #42209

PR Close #42259
@Kerrick
Copy link

Kerrick commented Oct 7, 2022

Any chance that we could get this added to the library as a component users of Angular Material could use?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add cookie popup to material.angular.io
4 participants