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

Fix keyboard help screen in forced-colors and scrollability #4619

Merged
merged 3 commits into from
Jan 18, 2023

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Jan 18, 2023

Fixes #4559.

Changelog Entry

Fixed

  • Fixes #4559. Keyboard help screen should be scrollable and its close button should appear correctly in light-themed high contrast mode, by @compulim in PR #4619

Description

In light-themed high contrast mode such as "Desert" theme, the close button and images in the keyboard help screen are not very visible because they are white-on-yellow.

Also, when Web Chat is in reduced size:

  • Keyboard help screen should not overflow the whole Web Chat
  • Images in keyboard help screen should keep their sizes

Note: support of dark theme in Web Chat is currently limited to the keyboard help screen.

Design

We need to add a few containers to make sure the dialog is properly styled:

  • Root container, has overflow: hidden and allow it to be "squeezed" by flex box
  • __border container for showing the shadowy border which is based on box-shadow
    • Otherwise, the root container overflow: hidden rule would hides shadows as they are outside of the box
  • __box container for overflow: hidden and hiding scrollbar behind round border radius
    • Otherwise, the scrollbar from __scrollable would render over round border radius
  • __scrollable container for scrollable

We also used mix-blend-mode: difference to turn SVG images into black so they are displayed properly for light-themed high contrast mode.

Specific Changes

  • Added a few supporting containers to <KeyboardHelp>
  • Styles changes to KeyboardHelp.ts
  • Added a few tests
  • Updated screenshots for some existing tests which should fail because the keyboard help images were squeezed in size
  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@compulim compulim marked this pull request as ready for review January 18, 2023 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A11y_Chat window_HighContrast:Cross button is not visible in desert HC mode.
2 participants