ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

There is no border or box-shadow for Dialog and Popover in Edge when High Contrast mode is enabled in Windows

Open BennyHuang opened this issue 6 years ago • 5 comments

Describe the bug There is no border or box-shadow for Dialog and Popover in Edge when High Contrast mode is enabled in Windows

To reproduce Steps to reproduce the behavior:

  1. Apply high contrast settings through Windows High contrast settings - Left shift+ Left alt +PrtSc
  2. Open Dialog or Popover
  3. Observe that there is no border or box-shadow around Dialog or Popover

Expected behavior There should be a box-shadow around Dialog or Popover

Screenshots image image

Context

  • OS/Platform: Windows 10
  • Browser (if relevant): Edge

BennyHuang avatar Apr 06 '20 04:04 BennyHuang

Hello @BennyHuang do you consider using the Chromium based Edge

ilhan007 avatar Apr 10 '20 08:04 ilhan007

Hello, @BennyHuang

UI5 Web Components, like OpenUI5, supports specifically developed High Contrast Themes, and they should be used by visually impaired people.

The feature you have tested with (Windows High Contrast Mode) cannot be influenced by us, and we cannot develop our components around it, unless we used a vendor-specific -ms-high-contrast CSS media query parameter, that is also already deprecated as of Edge 18 (Chromium-based). Windows High Contrast Mode has no effect on Chrome anyway. It's only visible in legacy MS browsers.

If you open the OpenUI5 Demo Kit (ui5.sap.com) you'll observe that all components lack borders too. We use the same theming concepts and parameters as OpenUI5 and we cannot deviate from them in order to trick this Windows feature. They would not be supported by SAP Theme Designer either.

@elenastoyanovaa Elena, do we support Windows High Contrast Mode (Shift+Alt+PrintScreen) as part of the Accessibility Standard at SAP?

@BennyHuang Is it a satisfactory solution to you to use the HCB theme, which looks exactly the same way for visually impaired users? You can test the theme f.e. for Dialog here:

https://sap.github.io/ui5-webcomponents/playground/components/Dialog/?sap-ui-theme=sap_belize_hcb&sap-ui-rtl=false

As you can see, it has the correct borders on all browsers, old Edge included: image

Regards, Vladi

vladitasev avatar Apr 10 '20 14:04 vladitasev

Hello @vladitasev ,

We are aware of the SAP Accessibility standard where either application themes (HCB, HCW) or Window high contrast settings theme should be supported by the web application to meet the success criteria. Often end users are not aware of a solution like application provided themes as it is not a widely offered solution among web applications, so they rely on Windows high contrast settings instead.

As UI5(OpenUI5 or Web components) Dialog applies a box-shadow to defined the Dialog boundaries, with Windows high contrast settings it will be overridden to none resulting in issues like below image

Currently we are applying the following solution to resolve the issue: We agree that using a browser vendor specific CSS property like "-ms-high-contrast" is not a good idea to rely on, to address the issue a border of "solid 1px" for Dialog container should be applied . We apply the border CSS property via application High contrast themes (HCW and HCW) on top of UI5 theme CSS. The end user should turn on the application high contrast theme though.

Except to Chrome, other major browsers like IE11, Edge and Firefox does support Windows high contrast theme settings. To reduce browser inconsistency and to take advantage of the solution like Dialog border from application high contrast themes, we recommend our customers to turn on application provided high contrast themes (HCB or HCW) along with the Windows high contrast settings. Which seem to work and meet the customers expectation.

We want to check with you to see if this can be adopted, given that the solution is trivial, so that we and other supporters of UI5 web components can take advantage of.

Thanks, Mastan Shaik

mastanshaikk avatar Apr 10 '20 16:04 mastanshaikk

Hello colleagues,

Although we do not officially support Windows High Contrast Mode, we believe the usability of the framework can be greatly enhanced with this change, as popups (popovers and dialogs) are widely used not only by themselves, but as part of other components too (selects, pickers, etc...).

The border however cannot always be set unconditionally, because it interferes with our design (you get both border and box-shadow in normal scenarios). Therefore, we have resorted to the vendor-specific media query to only apply the border when Windows High Contrast Mode is turned on.

Regards, Vladi

vladitasev avatar Apr 13 '20 07:04 vladitasev

@vladitasev Thanks for the fix.

BennyHuang avatar Apr 13 '20 20:04 BennyHuang