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

PWA audit: warn when no maskable icons are declared #10197

Closed
mathiasbynens opened this issue Jan 8, 2020 · 5 comments · Fixed by #10370
Closed

PWA audit: warn when no maskable icons are declared #10197

mathiasbynens opened this issue Jan 8, 2020 · 5 comments · Fixed by #10370

Comments

@mathiasbynens
Copy link
Member

mathiasbynens commented Jan 8, 2020

Feature request summary

In the PWA audit, consider checking if the manifest declares at least one maskable icon.

What is the motivation or use case for changing this?

Stable Chrome for Android and other browsers have supported maskable icons for a while now. Chrome DevTools can be used to check existing icons for maskability. Lighthouse could help guide developers to optimal-looking icons on any platform!

How is this beneficial to Lighthouse?

Optimal "add to homescreen" functionality is part of building a great PWA, and should therefore be reflected in the PWA audit scoring.

@patrickhulce
Copy link
Collaborator

patrickhulce commented Jan 8, 2020

Woah this is really neat! Definitely seems worth surfacing in some way.

should therefore be reflected in the PWA audit scoring.

A warning wouldn't affect the scoring of an audit. If we really wanted to move the needle here, I feel like it should become part of the base icon requirement, but that might be a bit extreme. Are there any valid use cases where one would not want to use a maskable icon?

@mathiasbynens
Copy link
Member Author

Are there any valid use cases where one would not want to use a maskable icon?

I can't think of any. It's strictly better to provide a maskable icon. Even in the case where you explicitly want to re-use the same image resource for both maskable and non-maskable icons, you'd still want to mark that resource as maskable in the manifest (i.e. "purpose": "any maskable").

@paulirish
Copy link
Member

ensure that important information is within a “safe zone” circle with a radius equal to 40% of the image’s size.

via https://css-tricks.com/maskable-icons-android-adaptive-icons-for-your-pwa/

@NotWoods, how'd you come at this 40% number? how do we know its not 43%, for example. :)

@NotWoods
Copy link

@paulirish The safe zone is specified in the spec: https://www.w3.org/TR/appmanifest/#icon-masks

@connorjclark
Copy link
Collaborator

This feels like a P1 to me, given the priority that DevTools gave this feature.

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

Successfully merging a pull request may close this issue.

6 participants