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

Sync dev-2122 to dev-2122-v4 #2177

Closed
wants to merge 7 commits into from
Prev Previous commit
Next Next commit
fix dark mode react portal pop-up (#2138)
nam-singh authored Jan 2, 2025
commit de7c45de1085dfa7f50a255dcbc6ded5c31354ab
33 changes: 25 additions & 8 deletions accessibility-checker-extension/src/ts/options/OptionsApp.tsx
Original file line number Diff line number Diff line change
@@ -43,6 +43,8 @@ import {

import "./option.scss";
import { getDevtoolsController } from "../devtools/devtoolsController";
import { Theme } from "@carbon/react";
import { BrowserDetection } from "../util/browserDetection";

interface OptionsAppState {
lastSettings?: ISettings
@@ -453,7 +455,9 @@ export class OptionsApp extends React.Component<{}, OptionsAppState> {
/>
</>}

{typeof document === 'undefined' ? null : ReactDOM.createPortal(<Modal
{typeof document === 'undefined' ? null : ReactDOM.createPortal(
<Theme theme={BrowserDetection.isDarkMode()?"g100":"white"}>
<Modal
aria-label="Version information"
modalHeading="Selecting a rule set deployment date"
passiveModal={true}
@@ -472,9 +476,13 @@ export class OptionsApp extends React.Component<{}, OptionsAppState> {

<p style={{ maxWidth: "100%" }}><strong>Rule sets</strong>: A packaged set for a guideline, each of which is a collection of rules mapped to the requirements in the accessibility guideline,
see the <Link inline={true} size="md" className="link" href="https://www.ibm.com/able/requirements/checker-rule-sets" target="_blank" style={{ color: '#002D9C' }}>Checker rule sets</Link>.</p>
</Modal>, document.body)}
</Modal>
</Theme>
, document.body)}

{typeof document === 'undefined' ? null : ReactDOM.createPortal(<Modal
{typeof document === 'undefined' ? null : ReactDOM.createPortal(
<Theme theme={BrowserDetection.isDarkMode()?"g100":"white"}>
<Modal
modalHeading="Stored scans"
size='sm'
primaryButtonText="Change deployment dates"
@@ -491,7 +499,9 @@ export class OptionsApp extends React.Component<{}, OptionsAppState> {
}
>
<p>Changing the rule set deployment dates will delete any currently stored scans.</p>
</Modal>, document.body)}
</Modal>
</Theme>
, document.body)}

</div>
{/**** Select ruleset / policy */}
@@ -535,7 +545,9 @@ export class OptionsApp extends React.Component<{}, OptionsAppState> {
/>
</>}

{typeof document === 'undefined' ? null : ReactDOM.createPortal(<Modal
{typeof document === 'undefined' ? null : ReactDOM.createPortal(
<Theme theme={BrowserDetection.isDarkMode()?"g100":"white"}>
<Modal
aria-label="Guidelines information"
modalHeading="Selecting an accessibility guideline"
passiveModal={true}
@@ -551,10 +563,14 @@ export class OptionsApp extends React.Component<{}, OptionsAppState> {
<p style={{ maxWidth: "100%" }}><strong>WCAG 2.0 (A, AA)</strong>: Referenced by US Section 508, but not the latest W3C specification.</p>
<p style={{ maxWidth: "100%" }}><strong>Rule sets</strong>: A packaged set for a guideline, each of which is a collection of rules mapped to requirements in the accessibility guideline,
see the <Link inline={true} size="md" className="link" href="https://www.ibm.com/able/requirements/checker-rule-sets" target="_blank" style={{ color: '#002D9C' }}>Checker rule sets</Link>.</p>
</Modal>, document.body)}
</Modal>
</Theme>
, document.body)}
</div>

{typeof document === 'undefined' ? null : ReactDOM.createPortal(<Modal
{typeof document === 'undefined' ? null : ReactDOM.createPortal(
<Theme theme={BrowserDetection.isDarkMode()?"g100":"white"}>
<Modal
modalHeading="Stored scans"
primaryButtonText="Change Guidelines"
secondaryButtonText="Cancel"
@@ -570,7 +586,8 @@ export class OptionsApp extends React.Component<{}, OptionsAppState> {
}
>
<p>Changing the rule set deployment dates will delete any currently stored scans.</p>
</Modal>, document.body)}
</Modal>
</Theme>, document.body)}


<h2>Keyboard checker mode</h2>