Problem/Motivation

When high contrast mode is enabled and using Edge, this check returns true:

 Modernizr.mq(
 '(-ms-high-contrast: active), (-ms-high-contrast: none)'
)

This results in the IE killswitch in the CKEditor 5 module being activated, and CKEditor 5 does not load at all despite Edge being a supported browser for CKEditor 5

According to MDN, ms-high-contrast support was removed as of Edge 18 (I'm currently running Edge 98) , but apparently when high contrast mode is enabled, something is present in a Modernizr-detecting capacity.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3270108

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bnjmnm created an issue. See original summary.

Wim Leers’s picture

Issue summary: View changes
Issue tags: +Accessibility
bnjmnm’s picture

Issue tags: +stable blocker

bnjmnm’s picture

Status: Active » Needs review
FileSize
1.03 MB
243.28 KB

Switched the detection method to the one jQuery uses (const isIE11 = !!document.documentMode;).

CKEditor 5 now loads in Edge while WHCM is enabled:

(btw this issue exists for the fact that WHCM doesn't look too great #3270130: [upstream] CKEditor 5 toolbar UI (+ Drupal's admin UI for configuring it) *technically* has WHCM regression)

IE11 still gets the warning as expected:

Wim Leers’s picture

Status: Needs review » Reviewed & tested by the community

Using the same battle-tested detection technique that jQuery used was exactly what I wanted to suggest! 🤓😄

Wim Leers’s picture

lauriii made their first commit to this issue’s fork.

lauriii’s picture

Tested manually with IE 11 to confirm that the message is still visible and tested with Edge to confirm that CKEditor 5 is loaded on both when high contrast is enabled and disabled.

Will commit after the test run is back ✌️

  • lauriii committed e2b5903 on 10.0.x
    Issue #3270108 by bnjmnm, Wim Leers: Editor does not load when using...

  • lauriii committed bac7705 on 9.4.x
    Issue #3270108 by bnjmnm, Wim Leers: Editor does not load when using...

  • lauriii committed 077ba1b on 9.3.x
    Issue #3270108 by bnjmnm, Wim Leers: Editor does not load when using...
lauriii’s picture

Version: 9.4.x-dev » 9.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed e2b5903 and pushed to 10.0.x. Also committed to 9.4.x and cherry-picked to 9.3.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.