Short answer
PNG compression works best when the image benefits from optimization without losing transparency or sharp UI edges. Not every PNG will become meaningfully smaller.
When this applies
Use it for interface screenshots, graphics, diagrams, and transparent assets. Consider WebP separately when browser support and the asset requirements allow it.
Practical review steps
- Confirm that transparency is retained where needed.
- Compare output dimensions and file size with the original.
- Inspect text, icons, and flat color areas for unwanted changes.
Check the actual color pair
Use the free Image Squeeze with the foreground and background colors from the real component. It provides an immediate AA and AAA ratio check in the current browser tab.
Source and limit
For the formal requirement, review W3C's WCAG contrast minimum guidance. A ratio result checks a color pair; it is not a complete accessibility audit.