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

Primary button text on notification with theme variant has too little contrast when theme is dark #7487

Open
3 of 10 tasks
FrediWa opened this issue Jun 14, 2024 · 0 comments
Open
3 of 10 tasks

Comments

@FrediWa
Copy link
Contributor

FrediWa commented Jun 14, 2024

What is the problem?

When theme is dark, the text to background contrast on a primary button on a notification with a theme variant is too low.

Minimum reproducible example:

<!DOCTYPE html>
<html lang="en" theme="dark">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Notification</title>
    <script type="module" src="./common.js"></script>
  </head>

  <body>
    <vaadin-notification position="middle" duration="0" theme="primary"></vaadin-notification>

    <script type="module">
      import '@vaadin/button';
      import '@vaadin/notification';

      const notification = document.querySelector('vaadin-notification');
      notification.renderer = (root) => {
        root.innerHTML = `
          Operation completed
          <vaadin-button theme="primary">Undo</vaadin-button>
          <vaadin-button>Close</vaadin-button>
        `
      };
      notification.open();
    </script>
  </body>
</html>

(this is just dev/notification.html with theme="dark" attribute in the html tag)

This a problem for all notification theme variants that have a white background for the primary button, namely primary, primary/error and primary/success.

Browsers

  • Chrome
  • Firefox
  • Safari
  • Safari on iOS
  • Edge

Screen Readers

  • None
  • NVDA
  • JAWS
  • VoiceOver on MacOS
  • VoiceOver on iOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants