├── src ├── tests │ ├── end-to-end │ │ ├── test-resources │ │ │ ├── favicon.ico │ │ │ ├── image │ │ │ │ └── img1.png │ │ │ ├── unicode-test.html │ │ │ ├── landmarks │ │ │ │ ├── no-landmarks.html │ │ │ │ └── mixed-landmarks.html │ │ │ ├── nested-iframes │ │ │ │ └── grandchild.html │ │ │ ├── clean.html │ │ │ ├── color-contrast │ │ │ │ └── poor-color-contrast.html │ │ │ ├── tab-stops │ │ │ │ └── out-of-order.html │ │ │ └── uncommon-characters.html │ │ ├── common │ │ │ ├── force-test-failure.ts │ │ │ ├── test-resources.ts │ │ │ └── page-controllers │ │ │ │ ├── html-report-page.ts │ │ │ │ └── content-page.ts │ │ ├── setup │ │ │ └── test-setup.ts │ │ └── tests │ │ │ └── details-view │ │ │ └── __snapshots__ │ │ │ └── instructions.test.ts.snap │ ├── unit │ │ ├── tests │ │ │ ├── common │ │ │ │ ├── configuration │ │ │ │ │ └── insights.config.test.json │ │ │ │ ├── react │ │ │ │ │ └── __snapshots__ │ │ │ │ │ │ └── named-fc.test.tsx.snap │ │ │ │ ├── browser-adapters │ │ │ │ │ └── __snapshots__ │ │ │ │ │ │ └── passthrough-browser-event-manager.test.ts.snap │ │ │ │ ├── components │ │ │ │ │ ├── cards │ │ │ │ │ │ └── __snapshots__ │ │ │ │ │ │ │ ├── path-card-row.test.tsx.snap │ │ │ │ │ │ │ ├── text-card-row.test.tsx.snap │ │ │ │ │ │ │ ├── class-name-card-row.test.tsx.snap │ │ │ │ │ │ │ ├── snippet-card-row.test.tsx.snap │ │ │ │ │ │ │ └── content-description-card-row.test.tsx.snap │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ ├── with-store-subscription.test.tsx.snap │ │ │ │ │ │ ├── guidance-tags.test.tsx.snap │ │ │ │ │ │ ├── issue-filing-needs-settings-help-text.test.tsx.snap │ │ │ │ │ │ └── copy-issue-details-button.test.tsx.snap │ │ │ │ │ └── scanning-spinner │ │ │ │ │ │ └── __snapshots__ │ │ │ │ │ │ └── scanning-spinner.test.tsx.snap │ │ │ │ ├── promises │ │ │ │ │ └── __snapshots__ │ │ │ │ │ │ └── promise-factory.test.ts.snap │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── store-update-message-hub.test.ts.snap │ │ │ │ └── is-result-highlight-unavailable.test.ts │ │ │ ├── injected │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── drawing-controller.test.ts.snap │ │ │ │ └── visualization │ │ │ │ │ ├── null-drawer.test.ts │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── highlight-box.test.tsx.snap │ │ │ ├── issue-filing │ │ │ │ ├── services │ │ │ │ │ └── null-issue-filing-service │ │ │ │ │ │ └── __snapshots__ │ │ │ │ │ │ └── null-issue-filing-service.test.tsx.snap │ │ │ │ └── common │ │ │ │ │ └── __snapshots__ │ │ │ │ │ ├── issue-filing-url-string-utils.test.ts.snap │ │ │ │ │ └── http-query-builder.test.ts.snap │ │ │ ├── reports │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── fast-pass-report-html-generator.test.tsx.snap │ │ │ │ │ ├── summary-report-html-generator.test.tsx.snap │ │ │ │ │ ├── combined-report-html-generator.test.tsx.snap │ │ │ │ │ └── report-html-generator.test.tsx.snap │ │ │ │ ├── components │ │ │ │ │ ├── report-sections │ │ │ │ │ │ └── __snapshots__ │ │ │ │ │ │ │ ├── body-section.test.tsx.snap │ │ │ │ │ │ │ ├── collapsible-result-section.test.tsx.snap │ │ │ │ │ │ │ ├── fast-pass-title-section.test.tsx.snap │ │ │ │ │ │ │ ├── fast-pass-results-title-section.test.tsx.snap │ │ │ │ │ │ │ ├── summary-report-header-section.test.tsx.snap │ │ │ │ │ │ │ ├── automated-checks-title-section.test.tsx.snap │ │ │ │ │ │ │ ├── collapsible-url-result-section.test.tsx.snap │ │ │ │ │ │ │ ├── tab-stops-report-instance-list.test.tsx.snap │ │ │ │ │ │ │ ├── summary-report-summary-section.test.tsx.snap │ │ │ │ │ │ │ ├── combined-report-summary-section.test.tsx.snap │ │ │ │ │ │ │ ├── details-section.test.tsx.snap │ │ │ │ │ │ │ ├── report-footer.test.tsx.snap │ │ │ │ │ │ │ ├── footer-text-for-unified.test.tsx.snap │ │ │ │ │ │ │ ├── footer-text.test.tsx.snap │ │ │ │ │ │ │ ├── tool-link.test.tsx.snap │ │ │ │ │ │ │ ├── content-container.test.tsx.snap │ │ │ │ │ │ │ └── results-container.test.tsx.snap │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ ├── header-bar.test.tsx.snap │ │ │ │ │ │ └── summary-report-head.test.tsx.snap │ │ │ │ │ └── summary-report-head.test.tsx │ │ │ │ └── package │ │ │ │ │ └── reporter-factory.test.ts │ │ │ ├── DetailsView │ │ │ │ └── components │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── load-assessment-button-factory.test.tsx.snap │ │ │ │ │ ├── banner-warnings.test.tsx.snap │ │ │ │ │ ├── next-requirement-button.test.tsx.snap │ │ │ │ │ ├── no-displayable-preview-features-message.test.tsx.snap │ │ │ │ │ ├── narrow-mode-detector.test.tsx.snap │ │ │ │ │ └── target-page-hidden-bar.test.tsx.snap │ │ │ │ │ ├── left-nav │ │ │ │ │ └── __snapshots__ │ │ │ │ │ │ ├── getting-started-nav-link.test.tsx.snap │ │ │ │ │ │ ├── left-nav-icon.test.tsx.snap │ │ │ │ │ │ └── test-view-left-nav-link.test.tsx.snap │ │ │ │ │ └── overview-content │ │ │ │ │ └── __snapshots__ │ │ │ │ │ ├── overview-heading.test.tsx.snap │ │ │ │ │ └── overview-help-section.test.tsx.snap │ │ │ ├── background │ │ │ │ ├── stores │ │ │ │ │ └── global │ │ │ │ │ │ └── __snapshots__ │ │ │ │ │ │ └── permissions-state-store.test.ts.snap │ │ │ │ └── __snapshots__ │ │ │ │ │ └── background-message-distributor.test.ts.snap │ │ │ ├── views │ │ │ │ └── content │ │ │ │ │ └── __snapshots__ │ │ │ │ │ ├── content.test.tsx.snap │ │ │ │ │ ├── guidance-title.test.tsx.snap │ │ │ │ │ └── content-include.test.tsx.snap │ │ │ ├── assessments │ │ │ │ └── common │ │ │ │ │ ├── renderer-wrapper.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── instructions-and-labels-note.test.tsx.snap │ │ │ ├── packages │ │ │ │ └── accessibility-insights-ui │ │ │ │ │ └── index.test.ts │ │ │ └── scanner │ │ │ │ └── __snapshots__ │ │ │ │ └── axe-utils.test.ts.snap │ │ └── common │ │ │ ├── it-is-function.ts │ │ │ ├── __snapshots__ │ │ │ ├── assessment-data-parser.test.tsx.snap │ │ │ └── application-properties-provider.test.ts.snap │ │ │ ├── typemoq-helper.ts │ │ │ ├── test-document-creator.ts │ │ │ ├── blob-provider.test.tsx │ │ │ ├── assessment-data-builder.ts │ │ │ ├── base-data-builder.ts │ │ │ └── tab-store-data-builder.ts │ ├── common │ │ ├── get-automation-id-selector.ts │ │ ├── serialize-error.ts │ │ └── flush-settled-promises.ts │ └── miscellaneous │ │ └── test-resource-server │ │ └── resource-server-config.ts ├── icons │ ├── ada │ │ ├── ada-laptop.png │ │ ├── sleeping-ada.png │ │ └── ada-multicolor-bubbles.png │ ├── button-video.png │ ├── identityImage.png │ └── brand │ │ ├── red │ │ ├── brand-red-16px.png │ │ ├── brand-red-48px.png │ │ ├── brand-red-128px.png │ │ └── brand-red-512px.png │ │ ├── blue │ │ ├── brand-blue-16px.png │ │ ├── brand-blue-48px.png │ │ ├── brand-blue-128px.png │ │ ├── brand-blue-256px.png │ │ └── brand-blue-512px.png │ │ ├── gray │ │ ├── brand-gray-16px.png │ │ ├── brand-gray-48px.png │ │ ├── brand-gray-128px.png │ │ └── brand-gray-512px.png │ │ ├── green │ │ ├── brand-green-128px.png │ │ ├── brand-green-16px.png │ │ ├── brand-green-48px.png │ │ └── brand-green-512px.png │ │ ├── white │ │ ├── brand-white-128px.png │ │ ├── brand-white-16px.png │ │ ├── brand-white-256px.png │ │ └── brand-white-48px.png │ │ ├── violet │ │ ├── brand-violet-128px.png │ │ ├── brand-violet-16px.png │ │ ├── brand-violet-48px.png │ │ └── brand-violet-512px.png │ │ └── blue-on-white │ │ ├── brand-blue-on-white-44px.png │ │ ├── brand-blue-on-white-50px.png │ │ └── brand-blue-on-white-150px.png ├── DetailsView │ ├── bundled-details-view-styles.ts │ ├── components │ │ ├── left-nav │ │ │ ├── nav-link-renderer.scss │ │ │ └── test-view-left-nav-link.scss │ │ ├── preview-features-toggle-list.scss │ │ ├── empty-validate-assessment-json.js │ │ ├── load-assessment-dialog.scss │ │ ├── target-change-dialog.scss │ │ ├── details-view-overlay │ │ │ └── scoping-panel │ │ │ │ └── scoping-container.scss │ │ ├── interactive-header.scss │ │ ├── invalid-load-assessment-dialog.scss │ │ ├── no-content-available │ │ │ └── no-content-available.scss │ │ ├── adhoc-issues-test-view.scss │ │ ├── export-dialog.scss │ │ ├── no-displayable-preview-features-message.scss │ │ ├── common-message-bar-styles.scss │ │ ├── requirement-view-title.scss │ │ ├── action-and-cancel-buttons-component.scss │ │ ├── target-page-changed-view.scss │ │ ├── generic-panel.scss │ │ ├── inline-start-over-button.scss │ │ ├── help-links.scss │ │ ├── common-dialog-styles.scss │ │ ├── tab-stops │ │ │ └── data-transfer-view-actions.ts │ │ ├── nav-link-button.scss │ │ ├── assessment-command-bar.tsx │ │ ├── quick-assess-command-bar.tsx │ │ ├── command-bar-buttons-menu.scss │ │ ├── tab-stops-failed-instance-section.scss │ │ └── automated-checks-command-bar.tsx │ ├── details-view-init-with-react-devtools.ts │ ├── tab-stops-requirements-with-instances.scss │ └── tab-stops-requirement-result.ts ├── injected │ ├── constants.ts │ ├── visualization │ │ ├── point.ts │ │ ├── svg-constants.ts │ │ ├── focus-indicator.ts │ │ ├── null-drawer.ts │ │ └── tabbed-item.ts │ ├── frameCommunicators │ │ ├── error-message-content.ts │ │ └── window-message.ts │ ├── iframe-detector.ts │ ├── window.d.ts │ ├── tab-stop-requirement-result.ts │ └── bounding-rect.ts ├── views │ ├── insights │ │ └── insights.scss │ └── page │ │ └── page.scss ├── common │ ├── types │ │ ├── check-type.ts │ │ ├── deep-partial.ts │ │ ├── hyperlink-definition.ts │ │ ├── idefault-constructor.ts │ │ ├── store-type.ts │ │ ├── store-data │ │ │ ├── itab.ts │ │ │ ├── command-store-data.ts │ │ │ ├── details-view-right-content-panel-type.ts │ │ │ ├── scoping-input-types.ts │ │ │ ├── data-transfer-store-data.ts │ │ │ ├── permissions-state-store-data.ts │ │ │ ├── details-view-pivot-type.ts │ │ │ ├── path-snippet-store-data.ts │ │ │ ├── feature-flag-store-data.ts │ │ │ ├── inspect-modes.ts │ │ │ ├── current-panel.ts │ │ │ ├── displayable-feature-flag.ts │ │ │ ├── needs-review-card-selection-store-data.ts │ │ │ ├── tab-stop-event.ts │ │ │ ├── inspect-store-data.ts │ │ │ ├── scan-incomplete-warnings.ts │ │ │ ├── dev-tool-store-data.ts │ │ │ ├── launch-panel-store-data.ts │ │ │ ├── tab-order-property-bag.ts │ │ │ ├── assessment-card-selection-store-data.ts │ │ │ ├── tab-store-data.ts │ │ │ ├── scoping-store-data.ts │ │ │ ├── adhoc-test-keys.ts │ │ │ ├── manual-test-status.ts │ │ │ └── details-view-store-data.ts │ │ ├── captured-instance-action-type.tsx │ │ ├── failure-instance-data.ts │ │ ├── link-component-type.ts │ │ ├── results-filter.ts │ │ ├── telemetry-processor.ts │ │ ├── property-bag │ │ │ ├── contrast.ts │ │ │ ├── label-in-name-property-bag.ts │ │ │ ├── state-changes.ts │ │ │ ├── ui-components.ts │ │ │ ├── meaningful-image.ts │ │ │ ├── default-widget.ts │ │ │ ├── link-purpose-property-bag.ts │ │ │ ├── image-function.ts │ │ │ ├── cues.ts │ │ │ ├── text-alternative-property-bag.ts │ │ │ ├── widget-function-property-bag.ts │ │ │ ├── link-function-property-bag.ts │ │ │ ├── custom-widgets-property-bag.ts │ │ │ └── property-bag-column-renderer-config.ts │ │ ├── versioned-assessment-data.ts │ │ ├── dev-tools-messages.ts │ │ ├── store-update-message.ts │ │ ├── test-view-type.ts │ │ ├── axe-analyzer-result.ts │ │ └── displayable-visualization-type-data.ts │ ├── browser-adapters │ │ ├── app-data-adapter.ts │ │ ├── commands-adapter.ts │ │ ├── storage-adapter.ts │ │ └── chromium-adapter.ts │ ├── components │ │ ├── scanning-spinner │ │ │ └── scanning-spinner.scss │ │ ├── cards │ │ │ ├── related-paths-card-row.scss │ │ │ ├── cards-visualization-modifier-buttons.scss │ │ │ ├── snippet-card-row.scss │ │ │ ├── failed-instances-section.scss │ │ │ ├── path-card-row.tsx │ │ │ ├── expand-collapse-all-button.scss │ │ │ ├── text-card-row.ts │ │ │ ├── class-name-card-row.ts │ │ │ ├── content-description-card-row.ts │ │ │ ├── snippet-card-row.tsx │ │ │ ├── how-to-fix-card-row.scss │ │ │ ├── pass-resolution-card-row.scss │ │ │ ├── visual-helper-toggle.scss │ │ │ ├── cards-view-store-data.ts │ │ │ ├── instance-details-group.scss │ │ │ ├── urls-card-row.scss │ │ │ ├── result-section.scss │ │ │ └── rich-resolution-content.scss │ │ ├── heading-element-for-level.scss │ │ ├── null-component.tsx │ │ ├── heading-with-content-common.scss │ │ ├── hamburger-menu-button.scss │ │ ├── left-nav-hamburger-button.scss │ │ ├── guidance-tags.scss │ │ ├── gear-menu-button.scss │ │ └── new-tab-link.tsx │ ├── globalization.ts │ ├── configs │ │ ├── test-mode.ts │ │ └── needs-review-rule-resources.ts │ ├── uid-generator.ts │ ├── blob-provider.ts │ ├── icons │ │ ├── circle-icon.tsx │ │ └── restore-icon.tsx │ ├── constants │ │ ├── frame-timeouts.ts │ │ └── keycode-constants.ts │ ├── promises │ │ └── is-promise.ts │ ├── action │ │ └── action-initiator.ts │ ├── flux │ │ └── action.ts │ ├── axe-info.ts │ ├── is-supported-browser.ts │ ├── utils │ │ └── id-generator.ts │ ├── insights-window-extensions.ts │ ├── assessment-data-parser.ts │ ├── base-store.ts │ ├── logging │ │ └── default-logger.ts │ ├── configuration │ │ ├── configuration-defaults.ts │ │ └── index.ts │ ├── message-creators │ │ └── types │ │ │ └── dispatcher.ts │ ├── is-result-highlight-unavailable.ts │ └── react │ │ └── named-fc.ts ├── popup │ └── popup-init-with-react-devtools.ts ├── content │ ├── strings │ │ ├── index.ts │ │ ├── text-content.ts │ │ └── application.ts │ ├── adhoc │ │ ├── color │ │ │ └── index.ts │ │ ├── headings │ │ │ └── index.ts │ │ ├── landmarks │ │ │ └── index.ts │ │ ├── accessible-names │ │ │ └── index.ts │ │ ├── tabstops │ │ │ ├── index.ts │ │ │ ├── extra-guidance.tsx │ │ │ └── guidance.tsx │ │ └── index.ts │ ├── rules │ │ └── index.ts │ ├── test │ │ ├── automated-checks │ │ │ └── index.ts │ │ ├── live-multimedia │ │ │ └── index.ts │ │ ├── cognitive │ │ │ └── index.ts │ │ ├── parsing │ │ │ └── index.ts │ │ ├── audio-video-only │ │ │ └── index.ts │ │ ├── sequence │ │ │ └── index.ts │ │ ├── page │ │ │ └── index.ts │ │ ├── contrast │ │ │ └── index.ts │ │ ├── links │ │ │ └── index.ts │ │ ├── language │ │ │ └── index.ts │ │ ├── landmarks │ │ │ └── index.ts │ │ ├── sensory │ │ │ └── index.ts │ │ ├── headings │ │ │ └── index.ts │ │ ├── images │ │ │ └── index.ts │ │ ├── timed-events │ │ │ └── index.ts │ │ └── errors │ │ │ └── index.ts │ ├── settings │ │ ├── improve-accessibility-insights.tsx │ │ └── high-contrast-mode.tsx │ ├── common.ts │ └── index.ts ├── reports │ ├── assessment-report.styles.ts │ ├── bundled-reporter-styles.ts │ ├── components │ │ ├── report-sections │ │ │ ├── minimal-rule-header.scss │ │ │ ├── footer-text-props.ts │ │ │ ├── results-by-url-container.scss │ │ │ ├── body-section.tsx │ │ │ ├── results-container.scss │ │ │ ├── body-section.scss │ │ │ ├── rules-results-container.scss │ │ │ ├── tab-stops-report-instance-list.scss │ │ │ ├── title-section.scss │ │ │ ├── fast-pass-title-section.tsx │ │ │ ├── common-mixins.scss │ │ │ ├── automated-checks-title-section.tsx │ │ │ ├── base-summary-report-section-props.ts │ │ │ ├── content-container.tsx │ │ │ └── report-footer.tsx │ │ ├── url-outcome-type.ts │ │ ├── instance-outcome-type.ts │ │ ├── outcome-icon.tsx │ │ └── assessment-report-header.scss │ ├── automated-checks-report.styles.ts │ └── react-static-renderer.ts ├── assessments │ ├── parsing │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── live-multimedia │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── custom-widgets │ │ ├── design-pattern.ts │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── assessment-default-message-generator.scss │ ├── cognitive │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── links │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── contrast │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── page │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── sequence │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── audio-video-only │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── language │ │ ├── test-steps │ │ │ └── test-steps.ts │ │ └── common │ │ │ └── language-attribute-link.tsx │ ├── headings │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── landmarks │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── images │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── color │ │ └── test-steps │ │ │ └── test-steps.tsx │ ├── errors │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── timed-events │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── native-widgets │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── repetitive-content │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── prerecorded-multimedia │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── pointer-motion │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── adaptable-content │ │ └── test-steps │ │ │ └── test-step.ts │ ├── semantics │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── visible-focus-order │ │ └── test-steps │ │ │ └── test-steps.ts │ ├── keyboard-interaction │ │ └── test-steps │ │ │ └── test-steps.ts │ └── auto-pass-if-no-results.ts ├── background │ ├── feature-flag-checker.ts │ ├── installation-data.ts │ ├── details-view-controller.ts │ ├── stores │ │ ├── side-panel.ts │ │ └── store-hub.ts │ ├── telemetry │ │ ├── telemetry-base-data.ts │ │ └── telemetry-client.ts │ ├── application-build-generator.ts │ ├── actions │ │ ├── command-actions.ts │ │ ├── side-panel-actions.ts │ │ ├── unified-scan-result-actions.ts │ │ ├── launch-panel-state-action.ts │ │ ├── needs-review-scan-result-actions.ts │ │ ├── data-transfer-actions.ts │ │ ├── path-snippet-actions.ts │ │ ├── permissions-state-actions.ts │ │ ├── injection-actions.ts │ │ ├── dev-tools-actions.ts │ │ ├── details-view-actions.ts │ │ └── content-actions.ts │ └── storage-data.ts ├── debug-tools │ ├── debug-tools.scss │ ├── components │ │ ├── debug-tools-view.scss │ │ └── telemetry-viewer │ │ │ └── telemetry-common-fields.scss │ ├── actions │ │ └── debug-tools-nav-actions.ts │ ├── controllers │ │ └── debug-tools-controller.ts │ └── debug-tools.html ├── issue-filing │ ├── services │ │ ├── github │ │ │ └── github-issue-filing-settings.tsx │ │ └── azure-boards │ │ │ └── azure-boards-issue-filing-settings.tsx │ └── common │ │ └── markup │ │ ├── truncate-snippet.ts │ │ └── markup-formatter.ts ├── packages │ └── accessibility-insights-ui │ │ ├── index.ts │ │ └── ui.scss ├── types │ ├── set-focus-visibility.ts │ └── common-types.ts ├── scanner │ ├── scan-options.ts │ ├── document-utils.ts │ ├── locale-configuration.ts │ ├── scanner-rule-info.ts │ ├── axe-options.ts │ └── role-utils.ts └── Devtools │ └── devtools.html ├── .gitattributes ├── copyright-header.txt ├── .github ├── CODEOWNERS └── ISSUE_TEMPLATE │ └── general_question.md ├── docs ├── art │ └── ada-cat.ansi256.txt └── screenshots │ ├── popup.png │ ├── details-view.png │ ├── screenshot1.png │ ├── screenshot2.png │ ├── target-page.png │ └── git-blame-custom-config-git-lens-vscode.png ├── .vscode ├── tsc.json └── extensions.json ├── packages ├── report-e2e-tests │ ├── tsconfig.json │ ├── src │ │ └── jest-setup.ts │ ├── prettier.config.js │ ├── .eslintrc.js │ └── jest.config.js ├── axe-config │ ├── index.js │ └── prettier.config.js ├── report │ ├── prettier.config.js │ └── tsconfig.json ├── ui │ └── prettier.config.js └── validator │ ├── prettier.config.js │ └── package.json ├── .swcrc ├── jest.config.js ├── .dockerignore ├── tools ├── strict-null-checks │ └── config.js └── clearly-defined │ └── clearly-defined-exclusions.json ├── pipeline ├── e2e-test-from-agent.yaml └── install-node-prerequisites.yaml ├── .ignoredRevs ├── CODE_OF_CONDUCT.md ├── .yarnrc.yml ├── .eslintrc.js └── new-appx.ps1 /src/tests/end-to-end/test-resources/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | *.mp3 binary 3 | -------------------------------------------------------------------------------- /copyright-header.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) Microsoft Corporation. All rights reserved. 2 | Licensed under the MIT License. -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # default owners for everything in the repository. 2 | * @Microsoft/accessibility-insights-code-owners 3 | -------------------------------------------------------------------------------- /docs/art/ada-cat.ansi256.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/docs/art/ada-cat.ansi256.txt -------------------------------------------------------------------------------- /docs/screenshots/popup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/docs/screenshots/popup.png -------------------------------------------------------------------------------- /src/icons/ada/ada-laptop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/ada/ada-laptop.png -------------------------------------------------------------------------------- /src/icons/button-video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/button-video.png -------------------------------------------------------------------------------- /src/icons/identityImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/identityImage.png -------------------------------------------------------------------------------- /src/icons/ada/sleeping-ada.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/ada/sleeping-ada.png -------------------------------------------------------------------------------- /docs/screenshots/details-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/docs/screenshots/details-view.png -------------------------------------------------------------------------------- /docs/screenshots/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/docs/screenshots/screenshot1.png -------------------------------------------------------------------------------- /docs/screenshots/screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/docs/screenshots/screenshot2.png -------------------------------------------------------------------------------- /docs/screenshots/target-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/docs/screenshots/target-page.png -------------------------------------------------------------------------------- /src/icons/brand/red/brand-red-16px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/red/brand-red-16px.png -------------------------------------------------------------------------------- /src/icons/brand/red/brand-red-48px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/red/brand-red-48px.png -------------------------------------------------------------------------------- /src/icons/ada/ada-multicolor-bubbles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/ada/ada-multicolor-bubbles.png -------------------------------------------------------------------------------- /src/icons/brand/blue/brand-blue-16px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/blue/brand-blue-16px.png -------------------------------------------------------------------------------- /src/icons/brand/blue/brand-blue-48px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/blue/brand-blue-48px.png -------------------------------------------------------------------------------- /src/icons/brand/gray/brand-gray-16px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/gray/brand-gray-16px.png -------------------------------------------------------------------------------- /src/icons/brand/gray/brand-gray-48px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/gray/brand-gray-48px.png -------------------------------------------------------------------------------- /src/icons/brand/red/brand-red-128px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/red/brand-red-128px.png -------------------------------------------------------------------------------- /src/icons/brand/red/brand-red-512px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/red/brand-red-512px.png -------------------------------------------------------------------------------- /src/icons/brand/blue/brand-blue-128px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/blue/brand-blue-128px.png -------------------------------------------------------------------------------- /src/icons/brand/blue/brand-blue-256px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/blue/brand-blue-256px.png -------------------------------------------------------------------------------- /src/icons/brand/blue/brand-blue-512px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/blue/brand-blue-512px.png -------------------------------------------------------------------------------- /src/icons/brand/gray/brand-gray-128px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/gray/brand-gray-128px.png -------------------------------------------------------------------------------- /src/icons/brand/gray/brand-gray-512px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/gray/brand-gray-512px.png -------------------------------------------------------------------------------- /src/icons/brand/green/brand-green-128px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/green/brand-green-128px.png -------------------------------------------------------------------------------- /src/icons/brand/green/brand-green-16px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/green/brand-green-16px.png -------------------------------------------------------------------------------- /src/icons/brand/green/brand-green-48px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/green/brand-green-48px.png -------------------------------------------------------------------------------- /src/icons/brand/green/brand-green-512px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/green/brand-green-512px.png -------------------------------------------------------------------------------- /src/icons/brand/white/brand-white-128px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/white/brand-white-128px.png -------------------------------------------------------------------------------- /src/icons/brand/white/brand-white-16px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/white/brand-white-16px.png -------------------------------------------------------------------------------- /src/icons/brand/white/brand-white-256px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/white/brand-white-256px.png -------------------------------------------------------------------------------- /src/icons/brand/white/brand-white-48px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/white/brand-white-48px.png -------------------------------------------------------------------------------- /.vscode/tsc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "watch": true, 5 | "rootDir": "../" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/icons/brand/violet/brand-violet-128px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/violet/brand-violet-128px.png -------------------------------------------------------------------------------- /src/icons/brand/violet/brand-violet-16px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/violet/brand-violet-16px.png -------------------------------------------------------------------------------- /src/icons/brand/violet/brand-violet-48px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/violet/brand-violet-48px.png -------------------------------------------------------------------------------- /src/icons/brand/violet/brand-violet-512px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/violet/brand-violet-512px.png -------------------------------------------------------------------------------- /src/tests/unit/tests/common/configuration/insights.config.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "options": { 3 | "fullName": "Full Name In Config File" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/tests/end-to-end/test-resources/image/img1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/tests/end-to-end/test-resources/image/img1.png -------------------------------------------------------------------------------- /src/icons/brand/blue-on-white/brand-blue-on-white-44px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/blue-on-white/brand-blue-on-white-44px.png -------------------------------------------------------------------------------- /src/icons/brand/blue-on-white/brand-blue-on-white-50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/blue-on-white/brand-blue-on-white-50px.png -------------------------------------------------------------------------------- /docs/screenshots/git-blame-custom-config-git-lens-vscode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/docs/screenshots/git-blame-custom-config-git-lens-vscode.png -------------------------------------------------------------------------------- /src/icons/brand/blue-on-white/brand-blue-on-white-150px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/accessibility-insights-web/main/src/icons/brand/blue-on-white/brand-blue-on-white-150px.png -------------------------------------------------------------------------------- /packages/report-e2e-tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "dist" 5 | }, 6 | "include": ["**/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /src/DetailsView/bundled-details-view-styles.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const styleSheet = `<>`; 4 | -------------------------------------------------------------------------------- /src/injected/constants.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const rootContainerId = 'accessibility-insights-root-container'; 4 | -------------------------------------------------------------------------------- /src/views/insights/insights.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../page/page.scss'; 4 | @import '../content/content.scss'; 5 | -------------------------------------------------------------------------------- /src/common/types/check-type.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | export enum CheckType { 5 | All, 6 | Any, 7 | None, 8 | } 9 | -------------------------------------------------------------------------------- /src/common/types/deep-partial.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type DeepPartial = { [P in keyof T]?: DeepPartial }; 4 | -------------------------------------------------------------------------------- /src/popup/popup-init-with-react-devtools.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | require('react-devtools'); 5 | require('./popup-init'); 6 | -------------------------------------------------------------------------------- /src/common/types/hyperlink-definition.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type HyperlinkDefinition = { href: string; text: string }; 4 | -------------------------------------------------------------------------------- /src/common/types/idefault-constructor.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface DefaultConstructor { 4 | new (): T; 5 | } 6 | -------------------------------------------------------------------------------- /src/common/types/store-type.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum StoreType { 4 | GlobalStore, 5 | TabContextStore, 6 | } 7 | -------------------------------------------------------------------------------- /src/content/strings/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as application from './application'; 4 | 5 | export { application }; 6 | -------------------------------------------------------------------------------- /src/injected/visualization/point.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | export interface Point { 5 | x: number; 6 | y: number; 7 | } 8 | -------------------------------------------------------------------------------- /src/reports/assessment-report.styles.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const styleSheet = `<>`; 4 | -------------------------------------------------------------------------------- /src/assessments/parsing/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum ParsingTestStep { 4 | parsing = 'parsing', 5 | } 6 | -------------------------------------------------------------------------------- /src/common/browser-adapters/app-data-adapter.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type AppDataAdapter = { 4 | getVersion(): string; 5 | }; 6 | -------------------------------------------------------------------------------- /src/common/components/scanning-spinner/scanning-spinner.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .scanning-spinner { 4 | margin-top: 50px; 5 | } 6 | -------------------------------------------------------------------------------- /src/injected/visualization/svg-constants.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const SVGNamespaceUrl: string = 'http://www.w3.org/2000/svg'; 4 | -------------------------------------------------------------------------------- /src/reports/bundled-reporter-styles.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const styleSheet = `<>`; 4 | -------------------------------------------------------------------------------- /src/common/globalization.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | export type Globalization = { 5 | languageCode: string; // e.g., 'en-us' 6 | }; 7 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/minimal-rule-header.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .outcome-chip-container { 4 | min-width: 50px; 5 | } 6 | -------------------------------------------------------------------------------- /src/DetailsView/components/left-nav/nav-link-renderer.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | .requirement-status-icon { 5 | font-size: 20px; 6 | } 7 | -------------------------------------------------------------------------------- /src/reports/automated-checks-report.styles.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const styleSheet = `<>`; 4 | -------------------------------------------------------------------------------- /src/DetailsView/components/preview-features-toggle-list.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | .preview-feature-toggle-list { 5 | margin-top: 2vh; 6 | } 7 | -------------------------------------------------------------------------------- /src/background/feature-flag-checker.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type FeatureFlagChecker = { 4 | isEnabled: (feature: string) => boolean; 5 | }; 6 | -------------------------------------------------------------------------------- /src/content/adhoc/color/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { guidance } from './guidance'; 4 | 5 | export const color = { 6 | guidance, 7 | }; 8 | -------------------------------------------------------------------------------- /src/tests/unit/tests/injected/__snapshots__/drawing-controller.test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`DrawingControllerTest drawer already registered 1`] = `"Drawer already registered to id: id"`; 4 | -------------------------------------------------------------------------------- /packages/axe-config/index.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | const axeScanOptions = require('./axe-config.json'); 5 | exports.axeScanOptions = axeScanOptions; 6 | -------------------------------------------------------------------------------- /packages/report-e2e-tests/src/jest-setup.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { toMatchFile } from 'jest-file-snapshot'; 4 | 5 | expect.extend({ toMatchFile }); 6 | -------------------------------------------------------------------------------- /src/DetailsView/components/empty-validate-assessment-json.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | // Placeholder for build generated assessment data JSON validator 5 | -------------------------------------------------------------------------------- /src/DetailsView/components/load-assessment-dialog.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | .load-button { 5 | button { 6 | width: 140px; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/DetailsView/components/target-change-dialog.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | .restart-button { 5 | button { 6 | width: 85px; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/DetailsView/details-view-init-with-react-devtools.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | require('react-devtools'); 5 | require('./details-view-initializer'); 6 | -------------------------------------------------------------------------------- /src/common/components/cards/related-paths-card-row.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .path-list { 4 | padding-left: 16px; 5 | list-style-type: disc; 6 | } 7 | -------------------------------------------------------------------------------- /src/common/types/store-data/itab.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface Tab { 4 | id?: number; 5 | url?: string; 6 | title?: string; 7 | } 8 | -------------------------------------------------------------------------------- /src/content/adhoc/headings/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { guidance } from './guidance'; 4 | 5 | export const headings = { 6 | guidance, 7 | }; 8 | -------------------------------------------------------------------------------- /src/assessments/live-multimedia/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum LiveMultimediaTestStep { 4 | liveCaptions = 'liveCaptions', 5 | } 6 | -------------------------------------------------------------------------------- /src/common/types/store-data/command-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface CommandStoreData { 4 | commands: chrome.commands.Command[]; 5 | } 6 | -------------------------------------------------------------------------------- /src/common/types/store-data/details-view-right-content-panel-type.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type DetailsViewRightContentPanelType = 'Overview' | 'TestView'; 4 | -------------------------------------------------------------------------------- /src/content/adhoc/landmarks/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { guidance } from './guidance'; 4 | 5 | export const landmarks = { 6 | guidance, 7 | }; 8 | -------------------------------------------------------------------------------- /src/debug-tools/debug-tools.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../common/styles/root-level-only/color-definitions.scss'; 4 | 5 | body { 6 | margin: 0; 7 | } 8 | -------------------------------------------------------------------------------- /src/tests/common/get-automation-id-selector.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | export const getAutomationIdSelector = (id: string) => `[data-automation-id="${id}"]`; 5 | -------------------------------------------------------------------------------- /packages/report/prettier.config.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | const baseConfig = require('../../prettier.config'); 4 | 5 | module.exports = { 6 | ...baseConfig, 7 | }; 8 | -------------------------------------------------------------------------------- /packages/ui/prettier.config.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | const baseConfig = require('../../prettier.config'); 4 | 5 | module.exports = { 6 | ...baseConfig, 7 | }; 8 | -------------------------------------------------------------------------------- /src/assessments/custom-widgets/design-pattern.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | class DesignPattern { 4 | public designPattern: string; 5 | public URL: string; 6 | } 7 | -------------------------------------------------------------------------------- /src/background/installation-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface InstallationData { 4 | id: string; 5 | month: number; 6 | year: number; 7 | } 8 | -------------------------------------------------------------------------------- /src/content/rules/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { uniqueLandmark } from './unique-landmark'; 4 | 5 | export const rules = { 6 | uniqueLandmark, 7 | }; 8 | -------------------------------------------------------------------------------- /src/issue-filing/services/github/github-issue-filing-settings.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type GitHubIssueFilingSettings = { 4 | repository: string; 5 | }; 6 | -------------------------------------------------------------------------------- /src/packages/accessibility-insights-ui/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import ui from './ui.scss'; 4 | export { ui }; 5 | 6 | export { UIFactory } from './ui-factory'; 7 | -------------------------------------------------------------------------------- /.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "jsc": { 3 | "parser": { 4 | "syntax": "typescript", 5 | "tsx": true 6 | } 7 | }, 8 | "module": { 9 | "type": "commonjs" 10 | }, 11 | "sourceMaps": "inline" 12 | } 13 | -------------------------------------------------------------------------------- /packages/axe-config/prettier.config.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | const baseConfig = require('../../prettier.config'); 4 | 5 | module.exports = { 6 | ...baseConfig, 7 | }; 8 | -------------------------------------------------------------------------------- /packages/validator/prettier.config.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | const baseConfig = require('../../prettier.config'); 4 | 5 | module.exports = { 6 | ...baseConfig, 7 | }; 8 | -------------------------------------------------------------------------------- /src/DetailsView/components/details-view-overlay/scoping-panel/scoping-container.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | .scoping-description { 5 | padding-bottom: 1vh; 6 | } 7 | -------------------------------------------------------------------------------- /src/DetailsView/components/interactive-header.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/colors.scss'; 4 | 5 | .nav-menu { 6 | color: $neutral-0; 7 | } 8 | -------------------------------------------------------------------------------- /src/background/details-view-controller.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type DetailsViewController = { 4 | showDetailsView(targetTabId: number): Promise; 5 | }; 6 | -------------------------------------------------------------------------------- /src/common/types/captured-instance-action-type.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum CapturedInstanceActionType { 4 | EDIT = 'EDIT', 5 | CREATE = 'CREATE', 6 | } 7 | -------------------------------------------------------------------------------- /src/common/types/store-data/scoping-input-types.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum ScopingInputTypes { 4 | include = 'include', 5 | exclude = 'exclude', 6 | } 7 | -------------------------------------------------------------------------------- /src/content/adhoc/accessible-names/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { guidance } from './guidance'; 4 | 5 | export const accessibleNames = { 6 | guidance, 7 | }; 8 | -------------------------------------------------------------------------------- /src/content/test/automated-checks/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { guidance } from './guidance'; 4 | 5 | export const automatedChecks = { 6 | guidance, 7 | }; 8 | -------------------------------------------------------------------------------- /packages/report-e2e-tests/prettier.config.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | const baseConfig = require('../../prettier.config'); 4 | 5 | module.exports = { 6 | ...baseConfig, 7 | }; 8 | -------------------------------------------------------------------------------- /src/DetailsView/components/invalid-load-assessment-dialog.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .invalid-load-assessment-dialog { 4 | button { 5 | width: 140px; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/tests/unit/tests/issue-filing/services/null-issue-filing-service/__snapshots__/null-issue-filing-service.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`NullIssueFilingService renders settings form 1`] = ``; 4 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/__snapshots__/fast-pass-report-html-generator.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`FastPassReportHtmlGenerator generateHtml 1`] = `""`; 4 | -------------------------------------------------------------------------------- /src/DetailsView/components/no-content-available/no-content-available.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .no-content-available { 4 | margin-left: 24px; 5 | margin-right: 24px; 6 | } 7 | -------------------------------------------------------------------------------- /src/assessments/assessment-default-message-generator.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .no-failure-view { 4 | font-size: 15px; 5 | font-weight: normal; 6 | padding: 15px; 7 | } 8 | -------------------------------------------------------------------------------- /src/common/components/heading-element-for-level.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | .heading-element-for-level { 5 | margin-block-start: unset; 6 | margin-block-end: unset; 7 | } 8 | -------------------------------------------------------------------------------- /src/common/configs/test-mode.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum TestMode { 4 | Adhoc = 'adhoc', 5 | Assessments = 'assessments', 6 | QuickAssess = 'quickAssess', 7 | } 8 | -------------------------------------------------------------------------------- /src/common/types/store-data/data-transfer-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | export interface DataTransferStoreData { 5 | quickAssessToAssessmentInitiated: boolean; 6 | } 7 | -------------------------------------------------------------------------------- /src/common/types/store-data/permissions-state-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface PermissionsStateStoreData { 4 | hasAllUrlAndFilePermissions: boolean; 5 | } 6 | -------------------------------------------------------------------------------- /src/common/uid-generator.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { v4 } from 'uuid'; 4 | 5 | export type UUIDGenerator = () => string; 6 | 7 | export const generateUID: UUIDGenerator = v4; 8 | -------------------------------------------------------------------------------- /src/tests/end-to-end/common/force-test-failure.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export function forceTestFailure(errorMessage: string): void { 4 | expect(errorMessage).toBeNull(); 5 | } 6 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/__snapshots__/summary-report-html-generator.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ReportHtmlGenerator generateHtml 1`] = `""`; 4 | -------------------------------------------------------------------------------- /src/types/set-focus-visibility.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { setFocusVisibility } from '@fluentui/react'; 4 | 5 | export type SetFocusVisibility = typeof setFocusVisibility; 6 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "esbenp.prettier-vscode", 4 | "dbaeumer.vscode-eslint", 5 | "ms-vscode.js-debug", 6 | "psioniq.psi-header", 7 | "stylelint.vscode-stylelint" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /src/tests/end-to-end/setup/test-setup.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { DEFAULT_E2E_TEST_TIMEOUT_MS } from '../common/timeouts'; 4 | 5 | jest.setTimeout(DEFAULT_E2E_TEST_TIMEOUT_MS); 6 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/__snapshots__/combined-report-html-generator.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`CombinedReportHtmlGenerator generateHtml 1`] = `""`; 4 | -------------------------------------------------------------------------------- /src/common/blob-provider.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | export function provideBlob(blobParts: any[], mimeType: string): Blob { 5 | return new Blob(blobParts, { type: mimeType }); 6 | } 7 | -------------------------------------------------------------------------------- /src/common/components/cards/cards-visualization-modifier-buttons.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .cards-visualization-modifiers-container { 4 | display: flex; 5 | flex-wrap: wrap; 6 | } 7 | -------------------------------------------------------------------------------- /src/common/types/failure-instance-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type FailureInstanceData = { 4 | failureDescription?: string; 5 | path?: string; 6 | snippet?: string; 7 | }; 8 | -------------------------------------------------------------------------------- /src/common/types/store-data/details-view-pivot-type.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum DetailsViewPivotType { 4 | fastPass = 0, 5 | assessment = 2, 6 | quickAssess = 3, 7 | } 8 | -------------------------------------------------------------------------------- /src/common/types/store-data/path-snippet-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | export interface PathSnippetStoreData { 5 | path: string | null; 6 | snippet: string | null; 7 | } 8 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/react/__snapshots__/named-fc.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`NamedFC renders as expected 1`] = ` 4 | 5 | 6 | TEXT 7 | 8 | 9 | `; 10 | -------------------------------------------------------------------------------- /src/background/stores/side-panel.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | // There will be more SidePanel types as we keep refactoring. 5 | export type SidePanel = 'Settings' | 'PreviewFeatures' | 'Scoping'; 6 | -------------------------------------------------------------------------------- /src/common/types/link-component-type.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ILinkProps } from '@fluentui/react'; 4 | 5 | export type LinkComponentType = React.FC>; 6 | -------------------------------------------------------------------------------- /src/injected/frameCommunicators/error-message-content.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface ErrorMessageContent { 4 | name: string; 5 | message: string; 6 | stack: string; 7 | } 8 | -------------------------------------------------------------------------------- /src/tests/unit/tests/DetailsView/components/__snapshots__/load-assessment-button-factory.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`LoadAssessmentFactory getLoadButtonForAssessment renders load assessment button 1`] = ``; 4 | -------------------------------------------------------------------------------- /src/tests/unit/common/it-is-function.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { isFunction } from 'lodash'; 4 | import { It } from 'typemoq'; 5 | 6 | export const itIsFunction = It.is(isFunction); 7 | -------------------------------------------------------------------------------- /src/background/telemetry/telemetry-base-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface TelemetryBaseData { 4 | name: string; 5 | properties: { 6 | [name: string]: string; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /src/common/types/store-data/feature-flag-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { DictionaryStringTo } from 'types/common-types'; 4 | 5 | export type FeatureFlagStoreData = DictionaryStringTo; 6 | -------------------------------------------------------------------------------- /src/assessments/cognitive/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | export const enum CognitiveTestStep { 5 | authentication = 'authentication', 6 | redundantEntry = 'redundant-entry', 7 | } 8 | -------------------------------------------------------------------------------- /src/common/components/cards/snippet-card-row.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../../common/styles/fonts.scss'; 4 | 5 | .snippet { 6 | font-family: $code-font-family; 7 | white-space: normal; 8 | } 9 | -------------------------------------------------------------------------------- /src/common/types/results-filter.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { UnifiedResult } from 'common/types/store-data/unified-data-interface'; 4 | 5 | export type ResultsFilter = (results: UnifiedResult) => boolean; 6 | -------------------------------------------------------------------------------- /packages/report/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "target": "es2017", 5 | "module": "amd", 6 | "lib": ["es2017", "dom", "scripthost"], 7 | "typeRoots": ["../../node_modules/@types"] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/DetailsView/components/adhoc-issues-test-view.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/common.scss'; 4 | 5 | .issues-test-view { 6 | background-color: $neutral-2; 7 | height: 100%; 8 | } 9 | -------------------------------------------------------------------------------- /src/DetailsView/components/export-dialog.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | .export-dialog { 5 | max-width: 640px; 6 | width: 75%; 7 | min-width: 240px !important; 8 | user-select: text; 9 | } 10 | -------------------------------------------------------------------------------- /src/DetailsView/components/no-displayable-preview-features-message.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/fonts.scss'; 4 | 5 | .no-preview-feature-message { 6 | @include text-style-body-m; 7 | } 8 | -------------------------------------------------------------------------------- /src/common/types/store-data/inspect-modes.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum InspectMode { 4 | scopingAddInclude = 'scopingAddInclude', 5 | scopingAddExclude = 'scopingAddExclude', 6 | off = 'off', 7 | } 8 | -------------------------------------------------------------------------------- /src/content/settings/improve-accessibility-insights.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const telemetryPopupTitle = `We need your help`; 4 | 5 | export const telemetryPopupCheckboxTitle = `I agree to enable telemetry`; 6 | -------------------------------------------------------------------------------- /src/reports/components/url-outcome-type.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type UrlOutcomeType = 'pass' | 'fail' | 'unscannable'; 4 | export const allUrlOutcomeTypes: UrlOutcomeType[] = ['fail', 'unscannable', 'pass']; 5 | -------------------------------------------------------------------------------- /src/assessments/links/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum LinksTestStep { 4 | linkFunction = 'linkFunction', 5 | linkPurpose = 'linkPurpose', 6 | labelInName = 'labelInName', 7 | } 8 | -------------------------------------------------------------------------------- /src/common/types/telemetry-processor.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { TelemetryDataFactory } from '../telemetry-data-factory'; 4 | 5 | export type TelemetryProcessor = (telemetryFactory: TelemetryDataFactory) => T; 6 | -------------------------------------------------------------------------------- /src/injected/visualization/focus-indicator.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface FocusIndicator { 4 | circle: Element; 5 | tabIndexLabel?: Element; 6 | line?: Element; 7 | failureLabel?: Element; 8 | } 9 | -------------------------------------------------------------------------------- /src/tests/miscellaneous/test-resource-server/resource-server-config.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type ResourceServerConfig = { 4 | port: number; 5 | absolutePath: string; 6 | extensions?: string[]; 7 | }; 8 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | module.exports = { 4 | projects: [ 5 | '/packages/*', 6 | '/src/tests/unit', 7 | '/src/tests/end-to-end', 8 | ], 9 | }; 10 | -------------------------------------------------------------------------------- /src/assessments/contrast/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum ContrastTestStep { 4 | uiComponents = 'ui-components', 5 | stateChanges = 'state-changes', 6 | graphics = 'graphics', 7 | } 8 | -------------------------------------------------------------------------------- /src/assessments/page/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum PageTestStep { 4 | pageTitle = 'pageTitle', 5 | frameTitle = 'frameTitle', 6 | generalNavigation = 'generalNavigation', 7 | } 8 | -------------------------------------------------------------------------------- /src/assessments/sequence/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum SequenceTestStep { 4 | cssPositioning = 'cssPositioning', 5 | layoutTables = 'layoutTables', 6 | columns = 'columns', 7 | } 8 | -------------------------------------------------------------------------------- /src/tests/unit/tests/DetailsView/components/__snapshots__/banner-warnings.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`BannerWarning render 1`] = ` 4 | 5 | 6 | 7 | 8 | `; 9 | -------------------------------------------------------------------------------- /src/tests/unit/tests/background/stores/global/__snapshots__/permissions-state-store.test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`PermissionsStateStoreTest getDefaultState returns expected default store state 1`] = ` 4 | { 5 | "hasAllUrlAndFilePermissions": false, 6 | } 7 | `; 8 | -------------------------------------------------------------------------------- /src/assessments/audio-video-only/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum AudioVideoOnlyTestStep { 4 | audioOnlyEquivalent = 'audioOnlyEquivalent', 5 | videoOnlyEquivalent = 'videoOnlyEquivalent', 6 | } 7 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/footer-text-props.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ScanMetadata } from 'common/types/store-data/unified-data-interface'; 4 | 5 | export type FooterTextProps = { scanMetadata: ScanMetadata }; 6 | -------------------------------------------------------------------------------- /src/DetailsView/components/left-nav/test-view-left-nav-link.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | .test-name { 5 | padding-left: 20px; 6 | display: inline-block; 7 | white-space: pre-wrap; 8 | line-height: 20px; 9 | } 10 | -------------------------------------------------------------------------------- /src/assessments/language/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum LanguageTestStep { 4 | languageOfPage = 'languageOfPage', 5 | languageOfParts = 'languageOfParts', 6 | textDirection = 'textDirection', 7 | } 8 | -------------------------------------------------------------------------------- /src/background/telemetry/telemetry-client.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface TelemetryClient { 4 | enableTelemetry(): void; 5 | disableTelemetry(): void; 6 | trackEvent(name: string, properties?: Object): void; 7 | } 8 | -------------------------------------------------------------------------------- /src/common/components/cards/failed-instances-section.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .failed-instances-container { 4 | :global { 5 | .collapsible-content { 6 | margin-left: 24px; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/common/components/cards/path-card-row.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { GetLabelledStringPropertyCardRow } from './get-labelled-string-property-card-row'; 4 | 5 | export const PathCardRow = GetLabelledStringPropertyCardRow('Path'); 6 | -------------------------------------------------------------------------------- /src/tests/common/serialize-error.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { inspect } from 'util'; 4 | 5 | export function serializeError(error: any): string { 6 | return `[Error]{\n${inspect(error, { compact: false, depth: 4 })}\n}`; 7 | } 8 | -------------------------------------------------------------------------------- /src/common/browser-adapters/commands-adapter.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type CommandsAdapter = { 4 | addCommandListener(callback: (command: string) => void): void; 5 | getCommands(): Promise; 6 | }; 7 | -------------------------------------------------------------------------------- /src/common/icons/circle-icon.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as React from 'react'; 4 | 5 | import { NamedFC } from '../react/named-fc'; 6 | 7 | export const CircleIcon = NamedFC('CircleIcon', () => ); 8 | -------------------------------------------------------------------------------- /src/common/types/store-data/current-panel.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface CurrentPanel { 4 | isPreviewFeaturesOpen: boolean; 5 | isScopingOpen: boolean; 6 | isContentOpen: boolean; 7 | isSettingsOpen: boolean; 8 | } 9 | -------------------------------------------------------------------------------- /src/content/test/live-multimedia/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as captions from './captions'; 4 | import { guidance } from './guidance'; 5 | 6 | export const liveMultimedia = { 7 | guidance, 8 | captions, 9 | }; 10 | -------------------------------------------------------------------------------- /src/tests/unit/common/__snapshots__/assessment-data-parser.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`AssessmentDataParser returns the parsed assessment data string as an object of type versionedAssessmentData 1`] = ` 4 | { 5 | "assessmentData": "data", 6 | "version": 1, 7 | } 8 | `; 9 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/body-section.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`BodySection renders 1`] = ` 4 | 5 |
6 | 1 7 |
8 |
11 | 2 12 |
13 | 14 | `; 15 | -------------------------------------------------------------------------------- /src/DetailsView/components/common-message-bar-styles.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | .message-bar-height-override { 5 | // min-height is set to 32px in MessageBar which behaves oddly and causes #6406. 6 | min-height: fit-content; 7 | } 8 | -------------------------------------------------------------------------------- /src/assessments/headings/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum HeadingsTestStep { 4 | headingFunction = 'headingFunction', 5 | missingHeadings = 'missingHeadings', 6 | headingLevel = 'headingLevel', 7 | } 8 | -------------------------------------------------------------------------------- /src/common/types/property-bag/contrast.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ColumnValueBag } from './column-value-bag'; 4 | 5 | export interface ContrastPropertyBag extends ColumnValueBag { 6 | textString: string; 7 | size: string; 8 | } 9 | -------------------------------------------------------------------------------- /src/common/types/store-data/displayable-feature-flag.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface DisplayableFeatureFlag { 4 | id: string; 5 | displayableName: string; 6 | displayableDescription: string; 7 | enabled: boolean; 8 | } 9 | -------------------------------------------------------------------------------- /src/common/types/store-data/needs-review-card-selection-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { CardSelectionStoreData } from './card-selection-store-data'; 5 | 6 | export type NeedsReviewCardSelectionStoreData = CardSelectionStoreData; 7 | -------------------------------------------------------------------------------- /src/common/types/store-data/tab-stop-event.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { Target } from 'scanner/iruleresults'; 5 | export interface TabStopEvent { 6 | timestamp: number; 7 | target: Target; 8 | html: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/content/adhoc/tabstops/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { extraGuidance } from './extra-guidance'; 4 | import { guidance } from './guidance'; 5 | 6 | export const tabstops = { 7 | guidance, 8 | extraGuidance, 9 | }; 10 | -------------------------------------------------------------------------------- /src/common/types/store-data/inspect-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { InspectMode } from './inspect-modes'; 4 | 5 | export interface InspectStoreData { 6 | inspectMode: InspectMode; 7 | hoveredOverSelector: string[] | null; 8 | } 9 | -------------------------------------------------------------------------------- /src/common/types/store-data/scan-incomplete-warnings.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | // This is a string-enum, but we only have one type right now 5 | export type ScanIncompleteWarningId = 'missing-required-cross-origin-permissions' | 'frame-skipped'; 6 | -------------------------------------------------------------------------------- /src/issue-filing/common/markup/truncate-snippet.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { truncate } from 'lodash'; 4 | export const maxSnippetLength = 256; 5 | 6 | export const truncateSnippet = (text: string) => truncate(text, { length: maxSnippetLength }); 7 | -------------------------------------------------------------------------------- /src/scanner/scan-options.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface ScanOptions { 4 | testsToRun?: string[]; 5 | dom?: Document | NodeList; 6 | selector?: string; 7 | include?: string[][]; 8 | exclude?: string[][]; 9 | } 10 | -------------------------------------------------------------------------------- /src/assessments/landmarks/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum LandmarkTestStep { 4 | landmarkRoles = 'landmark-roles', 5 | noRepeatingContent = 'no-repeating-content', 6 | primaryContent = 'primary-content', 7 | } 8 | -------------------------------------------------------------------------------- /src/common/components/cards/expand-collapse-all-button.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .expand-collapse-all-button { 4 | display: flex; 5 | padding: unset; 6 | padding-right: 27px; 7 | margin-left: -2px; 8 | margin-top: 2px; 9 | } 10 | -------------------------------------------------------------------------------- /src/common/components/cards/text-card-row.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { GetLabelledStringPropertyCardRow } from 'common/components/cards/get-labelled-string-property-card-row'; 4 | export const TextCardRow = GetLabelledStringPropertyCardRow('Text'); 5 | -------------------------------------------------------------------------------- /src/common/types/store-data/dev-tool-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface DevToolStoreData { 4 | isOpen: boolean; 5 | inspectElement: string[] | null; 6 | frameUrl: string | null; 7 | inspectElementRequestId: number; 8 | } 9 | -------------------------------------------------------------------------------- /src/debug-tools/components/debug-tools-view.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .debug-tools-container { 4 | display: flex; 5 | flex-flow: row wrap; 6 | } 7 | 8 | .nav { 9 | flex: 1 auto; 10 | } 11 | 12 | .main { 13 | flex: 2 0px; 14 | } 15 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/browser-adapters/__snapshots__/passthrough-browser-event-manager.test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`PassthroughBrowserEventManager addApplicationListener does not allow multiple registrations for the same event type 1`] = `"Listener already registered for event-type"`; 4 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/collapsible-result-section.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`CollapsibleResultSection renders 1`] = ` 4 | 5 |
8 | 9 | `; 10 | -------------------------------------------------------------------------------- /src/assessments/images/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum ImagesTestStep { 4 | imageFunction = 'imageFunction', 5 | textAlternative = 'textAlternative', 6 | imageOfText = 'imageOfText', 7 | captcha = 'captcha', 8 | } 9 | -------------------------------------------------------------------------------- /src/common/types/store-data/launch-panel-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum LaunchPanelType { 4 | AdhocToolsPanel, 5 | LaunchPad, 6 | } 7 | export interface LaunchPanelStoreData { 8 | launchPanelType: LaunchPanelType; 9 | } 10 | -------------------------------------------------------------------------------- /src/tests/unit/common/typemoq-helper.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { isEqual } from 'lodash'; 4 | import { It } from 'typemoq'; 5 | 6 | export function IsSameObject(object: T): T { 7 | return It.is(expectedObj => isEqual(expectedObj, object)); 8 | } 9 | -------------------------------------------------------------------------------- /src/tests/unit/tests/background/__snapshots__/background-message-distributor.test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`BackgroundMessageDistributor with unrecognized messages should emit a rejected promise describing the unrecognized message 1`] = `"Unable to interpret message - {"payload":"test-payload"}"`; 4 | -------------------------------------------------------------------------------- /src/common/types/property-bag/label-in-name-property-bag.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ColumnValueBag } from './column-value-bag'; 4 | 5 | export interface LabelInNamePropertyBag extends ColumnValueBag { 6 | accessibleName: string; 7 | url: string; 8 | } 9 | -------------------------------------------------------------------------------- /src/common/components/cards/class-name-card-row.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { GetLabelledStringPropertyCardRow } from 'common/components/cards/get-labelled-string-property-card-row'; 4 | export const ClassNameCardRow = GetLabelledStringPropertyCardRow('Class name'); 5 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/results-by-url-container.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | .url-results-container { 5 | margin-top: 56px; 6 | 7 | .results-heading { 8 | margin-top: 32px; 9 | margin-bottom: 32px; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/components/cards/__snapshots__/path-card-row.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`PathCardRow renders 1`] = ` 4 | 5 | 10 | 11 | `; 12 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/components/cards/__snapshots__/text-card-row.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`TextCardRow renders 1`] = ` 4 | 5 | 10 | 11 | `; 12 | -------------------------------------------------------------------------------- /src/common/components/null-component.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { NamedFC } from 'common/react/named-fc'; 4 | 5 | export const NullComponent = NamedFC('NullComponent', () => { 6 | return null; 7 | }); 8 | 9 | export const getNullComponent = () => null; 10 | -------------------------------------------------------------------------------- /src/content/strings/text-content.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { title } from './application'; 4 | 5 | export type TextContent = { 6 | applicationTitle: string; 7 | }; 8 | 9 | export const textContent: TextContent = { 10 | applicationTitle: title, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/report-e2e-tests/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | const baseModule = require('../../eslintrc.base'); 4 | module.exports = { 5 | ...baseModule, 6 | root: true, 7 | ignorePatterns: ['node_modules/', '**/*bundle.js', 'dist/', 'drop/', 'test-results/'], 8 | }; 9 | -------------------------------------------------------------------------------- /src/assessments/color/test-steps/test-steps.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum ColorSensoryTestStep { 4 | useOfColor = 'useOfColor', 5 | sensoryCharacteristics = 'sensoryCharacteristics', 6 | auditoryCues = 'auditoryCues', 7 | flashing = 'flashing', 8 | } 9 | -------------------------------------------------------------------------------- /src/common/browser-adapters/storage-adapter.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type StorageAdapter = { 4 | setUserData(items: Object): Promise; 5 | getUserData(keys: string[]): Promise<{ [key: string]: any }>; 6 | removeUserData(key: string): Promise; 7 | }; 8 | -------------------------------------------------------------------------------- /src/common/constants/frame-timeouts.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | // How long to wait for an iframe to respond to a window message before we declare it 5 | // unresponsive and start omitting it from tests/visualizations/etc. 6 | export const FRAME_COMMUNICATION_TIMEOUT_MS = 1000; 7 | -------------------------------------------------------------------------------- /src/common/types/store-data/tab-order-property-bag.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface PartialTabOrderPropertyBag { 4 | timestamp: number; 5 | } 6 | 7 | export interface TabOrderPropertyBag extends PartialTabOrderPropertyBag { 8 | tabOrder: number; 9 | } 10 | -------------------------------------------------------------------------------- /src/debug-tools/components/telemetry-viewer/telemetry-common-fields.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .container { 4 | display: grid; 5 | grid-template-columns: 7em auto; 6 | column-gap: 1em; 7 | 8 | > strong { 9 | justify-self: end; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/common/promises/is-promise.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | export function isPromise(value: unknown): value is Promise { 5 | // Don't use instanceof Promise; it can get confused by transpilation 6 | return !!value && typeof (value as any).then === 'function'; 7 | } 8 | -------------------------------------------------------------------------------- /src/content/strings/application.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const brand = 'Accessibility Insights'; 4 | export const title = `${brand} for Web`; 5 | export const productName = title; 6 | export const toolName = title; 7 | export const windowsProductName = `${brand} for Windows`; 8 | -------------------------------------------------------------------------------- /src/tests/unit/tests/DetailsView/components/left-nav/__snapshots__/getting-started-nav-link.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`GettingStartedNavLink renders 1`] = ` 4 | 5 | 8 | Getting started 9 | 10 | 11 | `; 12 | -------------------------------------------------------------------------------- /src/assessments/errors/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum ErrorsTestStep { 4 | errorIdentification = 'errorIdentification', 5 | errorSuggestion = 'errorSuggestion', 6 | errorPrevention = 'errorPrevention', 7 | statusMessages = 'statusMessages', 8 | } 9 | -------------------------------------------------------------------------------- /src/assessments/timed-events/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum TimedEventsTestStep { 4 | audioControl = 'audio-control', 5 | timeLimits = 'time-limits', 6 | movingContent = 'moving-content', 7 | autoUpdatingContent = 'auto-updating-content', 8 | } 9 | -------------------------------------------------------------------------------- /src/background/application-build-generator.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { config } from '../common/configuration'; 4 | 5 | export class ApplicationBuildGenerator { 6 | public getBuild(): string { 7 | return config.getOption('telemetryBuildName'); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/content/settings/high-contrast-mode.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as React from 'react'; 4 | 5 | export const enableHighContrastSettingsTitle = 'Enable high contrast'; 6 | export const highContrastSettingsDescription = <>Make text easier to see by using more distinct colors.; 7 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/body-section.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { NamedFC } from 'common/react/named-fc'; 4 | import * as React from 'react'; 5 | 6 | export const BodySection = NamedFC('BodySection', ({ children }) => { 7 | return {children}; 8 | }); 9 | -------------------------------------------------------------------------------- /src/DetailsView/components/requirement-view-title.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/common.scss'; 4 | 5 | .requirement-view-title { 6 | @include text-style-title-m; 7 | 8 | color: $primary-text; 9 | display: flex; 10 | align-items: center; 11 | } 12 | -------------------------------------------------------------------------------- /src/common/components/cards/content-description-card-row.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { GetLabelledStringPropertyCardRow } from 'common/components/cards/get-labelled-string-property-card-row'; 4 | export const ContentDescriptionCardRow = GetLabelledStringPropertyCardRow('Content description'); 5 | -------------------------------------------------------------------------------- /src/common/types/property-bag/state-changes.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ColumnValueBag } from './column-value-bag'; 4 | 5 | export interface StateChangesPropertyBag extends ColumnValueBag { 6 | accessibleName: string; 7 | role?: string; 8 | element?: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/common/types/property-bag/ui-components.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ColumnValueBag } from './column-value-bag'; 4 | 5 | export interface UIComponentsPropertyBag extends ColumnValueBag { 6 | accessibleName: string; 7 | role?: string; 8 | element?: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/common/types/versioned-assessment-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { AssessmentStoreData } from 'common/types/store-data/assessment-result-data'; 5 | 6 | export type VersionedAssessmentData = { 7 | version: number; 8 | assessmentData: AssessmentStoreData; 9 | }; 10 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/components/cards/__snapshots__/class-name-card-row.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ClassNameCardRow renders 1`] = ` 4 | 5 | 10 | 11 | `; 12 | -------------------------------------------------------------------------------- /src/common/types/dev-tools-messages.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { Message } from 'common/message'; 5 | 6 | export interface DevToolsStatusRequest extends Message { 7 | tabId: number; 8 | } 9 | 10 | export interface DevToolsStatusResponse { 11 | isActive: boolean; 12 | } 13 | -------------------------------------------------------------------------------- /src/common/types/property-bag/meaningful-image.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ColumnValueBag } from './column-value-bag'; 4 | 5 | export interface MeaningfulImagePropertyBag extends ColumnValueBag { 6 | imageType: string; 7 | accessibleName: string; 8 | role: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/common/constants/keycode-constants.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export class KeyCodeConstants { 4 | public static readonly TAB: number = 9; 5 | public static readonly ENTER: number = 13; 6 | public static readonly ALT: number = 18; 7 | public static readonly SPACEBAR: number = 32; 8 | } 9 | -------------------------------------------------------------------------------- /src/common/types/store-data/assessment-card-selection-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { CardSelectionStoreData } from 'common/types/store-data/card-selection-store-data'; 5 | 6 | export interface AssessmentCardSelectionStoreData { 7 | [testKey: string]: CardSelectionStoreData; 8 | } 9 | -------------------------------------------------------------------------------- /src/common/types/store-data/tab-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface TabStoreData { 4 | url?: string; 5 | title?: string; 6 | id?: number; 7 | isClosed: boolean; 8 | isChanged: boolean; 9 | isPageHidden: boolean; 10 | isOriginChanged: boolean; 11 | } 12 | -------------------------------------------------------------------------------- /src/scanner/document-utils.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export class DocumentUtils { 4 | private dom: Document; 5 | 6 | constructor(dom?: Document) { 7 | this.dom = dom || document; 8 | } 9 | 10 | public title(): string { 11 | return this.dom.title; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/fast-pass-title-section.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`FastPassTitleSection renders 1`] = ` 4 | 5 |
8 |

9 | FastPass results 10 |

11 |
12 |
13 | `; 14 | -------------------------------------------------------------------------------- /src/DetailsView/components/action-and-cancel-buttons-component.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .action-and-cancel-buttons-component { 4 | display: flex; 5 | justify-content: flex-end; 6 | 7 | .action-cancel-button-col + .action-cancel-button-col { 8 | margin-left: 8px; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/common/action/action-initiator.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type ActionInitiator = ( 4 | event: React.MouseEvent | MouseEvent, 5 | details: D, 6 | ) => void; 7 | 8 | export type ActionInitiators = { 9 | openExternalLink: ActionInitiator<{ href: string }>; 10 | }; 11 | -------------------------------------------------------------------------------- /src/common/types/property-bag/default-widget.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ColumnValueBag } from './column-value-bag'; 4 | 5 | export interface DefaultWidgetPropertyBag extends ColumnValueBag { 6 | element: string; 7 | accessibleName: string; 8 | accessibleDescription: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/DetailsView/components/target-page-changed-view.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/colors.scss'; 4 | 5 | .target-page-changed-subtitle { 6 | color: $secondary-text; 7 | max-width: 570px; 8 | font-size: 14px; 9 | margin-top: 4px; 10 | margin-bottom: 16px; 11 | } 12 | -------------------------------------------------------------------------------- /src/background/stores/store-hub.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { BaseStore } from '../../common/base-store'; 4 | import { StoreType } from '../../common/types/store-type'; 5 | 6 | export interface StoreHub { 7 | getAllStores(): BaseStore>[]; 8 | getStoreType(): StoreType; 9 | } 10 | -------------------------------------------------------------------------------- /src/common/components/cards/snippet-card-row.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { GetLabelledStringPropertyCardRow } from './get-labelled-string-property-card-row'; 4 | 5 | import styles from './snippet-card-row.scss'; 6 | 7 | export const SnippetCardRow = GetLabelledStringPropertyCardRow('Snippet', styles.snippet); 8 | -------------------------------------------------------------------------------- /src/common/types/property-bag/link-purpose-property-bag.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ColumnValueBag } from './column-value-bag'; 4 | 5 | export interface LinkPurposePropertyBag extends ColumnValueBag { 6 | accessibleName: string; 7 | accessibleDescription: string; 8 | url: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/results-container.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | .results-container { 5 | margin-top: 56px; 6 | 7 | .title-container :is(h1, h2, h3, h4, h5, h6) { 8 | font-weight: unset; 9 | margin-block: 0; 10 | margin-inline: 0; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/reports/react-static-renderer.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as ReactDOMServer from 'react-dom/server'; 4 | 5 | export class ReactStaticRenderer { 6 | public renderToStaticMarkup(element: JSX.Element): string { 7 | return ReactDOMServer.renderToStaticMarkup(element); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/scanner/locale-configuration.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as Axe from 'axe-core'; 4 | import { uniqueLandmarkRuleContent } from './custom-rules/unique-landmark'; 5 | 6 | export const localeConfiguration: Axe.Locale = { 7 | rules: { 8 | ...uniqueLandmarkRuleContent, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /src/tests/end-to-end/common/test-resources.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { testResourceServerConfigs } from 'tests/end-to-end/setup/test-resource-server-config'; 4 | 5 | export function getTestResourceUrl(path: string): string { 6 | return `http://localhost:${testResourceServerConfigs[0].port}/${path}`; 7 | } 8 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/fast-pass-results-title-section.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`FastPassResultsTitleSection renders 1`] = ` 4 | 5 |
8 |

9 | Test title 10 |

11 |
12 |
13 | `; 14 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/summary-report-header-section.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`SummaryReportHeaderSection renders 1`] = ` 4 | 5 |
6 | 9 |
10 |
11 | `; 12 | -------------------------------------------------------------------------------- /src/Devtools/devtools.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/assessments/native-widgets/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum NativeWidgetsTestStep { 4 | widgetFunction = 'widgetFunction', 5 | instructions = 'nativeInstructions', 6 | label = 'nativeLabel', 7 | cues = 'nativeCues', 8 | autocomplete = 'nativeAutocomplete', 9 | } 10 | -------------------------------------------------------------------------------- /src/common/components/heading-with-content-common.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/common.scss'; 4 | 5 | .header-with-content-link { 6 | display: flex; 7 | 8 | h1 { 9 | margin-right: 8px; 10 | } 11 | 12 | div { 13 | align-self: center; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/common/types/property-bag/image-function.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ColumnValueBag } from './column-value-bag'; 4 | 5 | export interface ImageFunctionPropertyBag extends ColumnValueBag { 6 | imageType: string; 7 | accessibleName: string; 8 | codedAs: string; 9 | role: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/common/types/store-data/scoping-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ScopingInputTypes } from './scoping-input-types'; 4 | 5 | export type SingleElementSelector = string[]; 6 | 7 | export interface ScopingStoreData { 8 | selectors: { [key in ScopingInputTypes]: SingleElementSelector[] }; 9 | } 10 | -------------------------------------------------------------------------------- /src/injected/iframe-detector.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | export type QuerySelectable = Pick; 5 | 6 | export class IframeDetector { 7 | constructor(private document: QuerySelectable) {} 8 | 9 | public hasIframes = () => this.document.querySelector('iframe') != null; 10 | } 11 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/components/cards/__snapshots__/snippet-card-row.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`SnippetCardRow renders 1`] = ` 4 | 5 | 11 | 12 | `; 13 | -------------------------------------------------------------------------------- /src/assessments/repetitive-content/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum RepetitiveContentTestStep { 4 | bypassBlocks = 'bypassBlocks', 5 | consistentNavigation = 'consistentNavigation', 6 | consistentIdentification = 'consistentIdentification', 7 | consistentHelp = 'consistentHelp', 8 | } 9 | -------------------------------------------------------------------------------- /src/common/types/property-bag/cues.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { BagOf, ColumnValueBag } from './column-value-bag'; 4 | 5 | export interface CuesPropertyBag extends ColumnValueBag { 6 | element: string; 7 | accessibleName: string; 8 | htmlCues: BagOf; 9 | ariaCues: BagOf; 10 | } 11 | -------------------------------------------------------------------------------- /src/tests/unit/tests/views/content/__snapshots__/content.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`content renders 1`] = ` 4 | 5 | 8 | 12 | 13 | 14 | `; 15 | -------------------------------------------------------------------------------- /src/common/types/property-bag/text-alternative-property-bag.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ColumnValueBag } from './column-value-bag'; 4 | 5 | export interface TextAlternativePropertyBag extends ColumnValueBag { 6 | imageType: string; 7 | accessibleName: string; 8 | accessibleDescription: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/content/test/cognitive/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as authentication from './authentication'; 4 | import { guidance } from './guidance'; 5 | import * as redundantEntry from './redundant-entry'; 6 | 7 | export const cognitive = { 8 | authentication, 9 | redundantEntry, 10 | guidance, 11 | }; 12 | -------------------------------------------------------------------------------- /src/debug-tools/actions/debug-tools-nav-actions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { AsyncAction } from 'common/flux/async-action'; 4 | import { ToolsNavKey } from 'debug-tools/stores/debug-tools-nav-store'; 5 | 6 | export class DebugToolsNavActions { 7 | public readonly setSelectedTool = new AsyncAction(); 8 | } 9 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/promises/__snapshots__/promise-factory.test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`promiseFactory timeout rejects with the pinned error message on timeout 1`] = `"Timed out after 1ms"`; 4 | 5 | exports[`promiseFactory timeout rejects with the pinned error message on timeout with error context 1`] = `"Timed out after 1ms at context test-error-context"`; 6 | -------------------------------------------------------------------------------- /src/tests/unit/tests/issue-filing/common/__snapshots__/issue-filing-url-string-utils.test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`IssueFilingUrlStringUtilsTest getTitle with tags 1`] = `"WCAG-1.4.1,WCAG-2.8.2,some displayText,some other displayText: RR-help (RR-selector)"`; 4 | 5 | exports[`IssueFilingUrlStringUtilsTest getTitle without tags 1`] = `"RR-help (RR-selector)"`; 6 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/automated-checks-title-section.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`AutomatedChecksTitleSection renders 1`] = ` 4 | 5 |
8 |

9 | Automated checks results 10 |

11 |
12 |
13 | `; 14 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/collapsible-url-result-section.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`CollapsibleUrlResultSection renders 1`] = ` 4 | 5 |
8 |
9 | Collapsible component 10 |
11 |
12 |
13 | `; 14 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/tab-stops-report-instance-list.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`TabStopsReportInstanceList renders 1`] = ` 4 | 5 |
8 | 11 |
12 |
13 | `; 14 | -------------------------------------------------------------------------------- /src/common/flux/action.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | export type ActionListener = (payload: TPayload) => TReturn; 5 | 6 | export interface Action { 7 | invoke(payload: TPayload, scope?: string): TReturn; 8 | addListener(listener: ActionListener): void; 9 | } 10 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/__snapshots__/header-bar.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`HeaderBar renders 1`] = ` 4 | 5 |
8 | 9 |
12 | header text 13 |
14 |
15 |
16 | `; 17 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/components/cards/__snapshots__/content-description-card-row.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ContentDescriptionCardRow renders 1`] = ` 4 | 5 | 10 | 11 | `; 12 | -------------------------------------------------------------------------------- /src/assessments/prerecorded-multimedia/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum PrerecordedMultimediaTestStep { 4 | captions = 'captions', 5 | noObstruction = 'noObstruction', 6 | audioDescription = 'audioDescription', 7 | synchronization = 'synchronization', 8 | noConflict = 'noConflict', 9 | } 10 | -------------------------------------------------------------------------------- /src/reports/components/instance-outcome-type.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type InstanceOutcomeType = 'pass' | 'fail' | 'inapplicable' | 'review' | 'incomplete'; 4 | export const allInstanceOutcomeTypes: InstanceOutcomeType[] = [ 5 | 'fail', 6 | 'pass', 7 | 'inapplicable', 8 | 'review', 9 | 'incomplete', 10 | ]; 11 | -------------------------------------------------------------------------------- /src/tests/unit/common/test-document-creator.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { JSDOM } from 'jsdom'; 4 | 5 | export class TestDocumentCreator { 6 | public static createTestDocument(html: string = ''): Document { 7 | const jsdom = new JSDOM(`${html}`); 8 | return jsdom.window.document; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/types/common-types.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface DictionaryStringTo { 4 | [key: string]: T; 5 | } 6 | 7 | export interface DictionaryNumberTo { 8 | [key: number]: T; 9 | } 10 | 11 | export interface FunctionPPR { 12 | (param1: TParam1, param2?: TParam2): TResult; 13 | } 14 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. All rights reserved. 2 | # Licensed under the MIT License. 3 | 4 | # ignoring files that we dont need for e2e tests 5 | .git/ 6 | dist/ 7 | drop/ 8 | extension/ 9 | node_modules/ 10 | test-results/ 11 | 12 | # Yarn config for non-zero-installs 13 | .pnp.* 14 | .yarn/* 15 | !.yarn/patches 16 | !.yarn/plugins 17 | !.yarn/releases 18 | !.yarn/sdks 19 | !.yarn/versions 20 | -------------------------------------------------------------------------------- /src/common/types/store-data/adhoc-test-keys.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum AdHocTestkeys { 4 | Color = 'color', 5 | Headings = 'headings', 6 | Issues = 'issues', 7 | Landmarks = 'landmarks', 8 | TabStops = 'tabStops', 9 | NeedsReview = 'needsReview', 10 | AccessibleNames = 'accessibleNames', 11 | } 12 | -------------------------------------------------------------------------------- /src/injected/window.d.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { MainWindowContext } from './main-window-context'; 4 | import { WindowInitializer } from './window-initializer'; 5 | 6 | declare global { 7 | interface Window { 8 | windowInitializer: WindowInitializer; 9 | mainWindowContext: MainWindowContext; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/body-section.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../../common/styles/colors.scss'; 4 | @import '../../../common/styles/fonts.scss'; 5 | 6 | body { 7 | font-size: 14px; 8 | margin: auto; 9 | background-color: $neutral-2; 10 | color: black; 11 | font-family: $font-family; 12 | } 13 | -------------------------------------------------------------------------------- /src/tests/end-to-end/test-resources/unicode-test.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | Unicode character test for AI-Web 8 | 9 | 10 |

Unicode character

11 | 12 |
My special char: Ω
13 | 14 | 15 | -------------------------------------------------------------------------------- /src/tests/end-to-end/test-resources/landmarks/no-landmarks.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | Landmarks - None 10 | 11 | 12 | 13 |

No landmarks on this page

14 | 15 | 16 | -------------------------------------------------------------------------------- /src/tests/end-to-end/tests/details-view/__snapshots__/instructions.test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Details View -> Quick Assess -> Instructions Requirement page should pass accessibility validation with highContrastMode=false 1`] = `[]`; 4 | 5 | exports[`Details View -> Quick Assess -> Instructions Requirement page should pass accessibility validation with highContrastMode=true 1`] = `[]`; 6 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/__snapshots__/store-update-message-hub.test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`StoreUpdateMessageHub Errors if a store update listener is registered before the hub's listener 1`] = `"StoreUpdateMessageHub.browserMessageHandler must be registered as a browser listener *before* registering individual store update listeners to avoid missing store state initialization messages"`; 4 | -------------------------------------------------------------------------------- /src/DetailsView/components/generic-panel.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/colors.scss'; 4 | @import '../../common/styles/fonts.scss'; 5 | 6 | .generic-panel { 7 | color: $neutral-100; 8 | } 9 | 10 | .header-text { 11 | @include text-style-title-m; 12 | 13 | color: $neutral-100; 14 | margin-bottom: 20px; 15 | } 16 | -------------------------------------------------------------------------------- /src/assessments/pointer-motion/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum PointerMotionTestStep { 4 | pointerGestures = 'pointer-gestures', 5 | pointerCancellation = 'pointer-cancellation', 6 | motionOperation = 'motion-operation', 7 | draggingMovements = 'dragging-movements', 8 | targetSize = 'target-size', 9 | } 10 | -------------------------------------------------------------------------------- /src/tests/end-to-end/test-resources/nested-iframes/grandchild.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | nested-iframes grandchild frame 10 | 11 | 12 | 13 |

grandchild frame

14 | 15 | 16 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/components/__snapshots__/with-store-subscription.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`withStoreSubscription render: after store change 1`] = ` 4 |
5 |

6 | after change 7 |

8 |
9 | `; 10 | 11 | exports[`withStoreSubscription render: before store change 1`] = ` 12 |
13 |

14 | before change 15 |

16 |
17 | `; 18 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/summary-report-summary-section.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`SummaryReportSummarySection renders 1`] = ` 4 | 5 | 11 | 12 | `; 13 | -------------------------------------------------------------------------------- /src/DetailsView/components/inline-start-over-button.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/colors.scss'; 4 | 5 | .inline-start-over-button { 6 | height: fit-content; 7 | padding: 4px; 8 | margin-bottom: -4px; 9 | vertical-align: text-bottom; 10 | border-color: $secondary-text; 11 | background-color: $neutral-0; 12 | } 13 | -------------------------------------------------------------------------------- /src/content/test/parsing/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { guidance } from './guidance'; 4 | import { keyboardBookmarkletInstructions } from './keyboard-bookmarklet-instructions'; 5 | import * as parsingContent from './parsing'; 6 | 7 | export const parsing = { 8 | guidance, 9 | parsingContent, 10 | keyboardBookmarkletInstructions, 11 | }; 12 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/rules-results-container.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | @import '../../../common/styles/fonts.scss'; 5 | 6 | .rules-results-container { 7 | margin-top: 56px; 8 | 9 | .results-heading { 10 | margin-top: 32px; 11 | margin-bottom: 32px; 12 | @include text-style-title-s; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/combined-report-summary-section.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`CombinedReportSummarySection renders 1`] = ` 4 | 5 | 11 | 12 | `; 13 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/details-section.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`DetailsSection getUrlItemInfo 1`] = ` 4 | { 5 | "content": 9 | https://page-url/ 10 | , 11 | "label": "target page url:", 12 | } 13 | `; 14 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/report-footer.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ReportFooter renders 1`] = ` 4 | 5 | 15 | 16 | `; 17 | -------------------------------------------------------------------------------- /src/DetailsView/components/help-links.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/colors.scss'; 4 | @import '../../common/styles/fonts.scss'; 5 | 6 | .help-link { 7 | padding-top: 5px; 8 | padding-bottom: 5px; 9 | font-family: $font-family; 10 | line-height: 20px; 11 | font-size: 14px; 12 | color: $communication-primary; 13 | } 14 | -------------------------------------------------------------------------------- /src/common/components/cards/how-to-fix-card-row.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../../common/styles/colors.scss'; 4 | 5 | .how-to-fix-content { 6 | margin-bottom: 16px; 7 | 8 | ul { 9 | padding-left: 16px; 10 | 11 | li { 12 | list-style-type: disc; 13 | margin-bottom: 4px; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/content/test/audio-video-only/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as audioOnlyEquivalent from './audio-only-equivalent'; 4 | import { guidance } from './guidance'; 5 | import * as videoOnlyEquivalent from './video-only-equivalent'; 6 | 7 | export const audioVideoOnly = { 8 | guidance, 9 | audioOnlyEquivalent, 10 | videoOnlyEquivalent, 11 | }; 12 | -------------------------------------------------------------------------------- /src/tests/end-to-end/common/page-controllers/html-report-page.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as Playwright from 'playwright'; 4 | import { Page, PageOptions } from './page'; 5 | 6 | export class HtmlReportPage extends Page { 7 | constructor(underlyingPage: Playwright.Page, options?: PageOptions) { 8 | super(underlyingPage, options); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/background/actions/command-actions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { AsyncAction } from 'common/flux/async-action'; 5 | 6 | export interface GetCommandsPayload { 7 | commands: chrome.commands.Command[]; 8 | tabId: number; 9 | } 10 | 11 | export class CommandActions { 12 | public readonly getCommands = new AsyncAction(); 13 | } 14 | -------------------------------------------------------------------------------- /src/background/actions/side-panel-actions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { SidePanel } from 'background/stores/side-panel'; 4 | import { AsyncAction } from 'common/flux/async-action'; 5 | 6 | export class SidePanelActions { 7 | public readonly openSidePanel = new AsyncAction(); 8 | public readonly closeSidePanel = new AsyncAction(); 9 | } 10 | -------------------------------------------------------------------------------- /src/common/axe-info.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as Axe from 'axe-core'; 4 | 5 | export class AxeInfo { 6 | public static get Default(): AxeInfo { 7 | return new AxeInfo(Axe); 8 | } 9 | 10 | constructor(private axe: typeof Axe) {} 11 | 12 | public get version(): string { 13 | return (this.axe as any).version; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/common/types/property-bag/widget-function-property-bag.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { BagOf, ColumnValueBag } from './column-value-bag'; 4 | 5 | export interface WidgetFunctionPropertyBag extends ColumnValueBag { 6 | element: string; 7 | accessibleName: string; 8 | role: string; 9 | ariaAttributes: BagOf; 10 | tabIndex: string; 11 | } 12 | -------------------------------------------------------------------------------- /src/tests/unit/tests/assessments/common/renderer-wrapper.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as React from 'react'; 4 | 5 | interface RendererProps { 6 | render: () => JSX.Element; 7 | } 8 | 9 | export class RendererWrapper extends React.Component { 10 | public render(): JSX.Element { 11 | return this.props.render(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/DetailsView/components/common-dialog-styles.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | div.insights-dialog-main-override { 4 | width: 75%; 5 | max-width: 500px; 6 | @media screen and (width <= 500px) { 7 | min-width: 240px; 8 | width: 75%; 9 | } 10 | 11 | user-select: text; 12 | 13 | .dialog-body { 14 | font-size: 16px; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/common/browser-adapters/chromium-adapter.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { WebExtensionBrowserAdapter } from 'common/browser-adapters/webextension-browser-adapter'; 4 | 5 | export class ChromiumAdapter extends WebExtensionBrowserAdapter { 6 | public getManageExtensionUrl(): string { 7 | return `chrome://extensions/?id=${chrome.runtime.id}`; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/common/components/cards/pass-resolution-card-row.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../../common/styles/colors.scss'; 4 | 5 | .pass-resolution-content { 6 | margin-bottom: 16px; 7 | 8 | ul { 9 | padding-left: 16px; 10 | 11 | li { 12 | list-style-type: disc; 13 | margin-bottom: 4px; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/common/types/store-data/manual-test-status.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum ManualTestStatus { 4 | PASS, 5 | UNKNOWN, 6 | FAIL, 7 | } 8 | 9 | export interface ManualTestStatusData { 10 | [key: string]: TestStepData; 11 | } 12 | 13 | export interface TestStepData { 14 | stepFinalResult: ManualTestStatus; 15 | isStepScanned: boolean; 16 | } 17 | -------------------------------------------------------------------------------- /src/content/common.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as react from 'react'; 4 | 5 | import { ContentCreator } from 'views/content/content-page'; 6 | import { GuidanceTitle as gt } from 'views/content/guidance-title'; 7 | import { link } from './link'; 8 | 9 | export const create = ContentCreator(link); 10 | export const React = react; 11 | export const GuidanceTitle = gt; 12 | -------------------------------------------------------------------------------- /src/content/test/sequence/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import * as columns from './columns'; 5 | import * as cssPositioning from './css-positioning'; 6 | import { guidance } from './guidance'; 7 | import * as layoutTables from './layout-tables'; 8 | export const sequence = { 9 | guidance, 10 | cssPositioning, 11 | columns, 12 | layoutTables, 13 | }; 14 | -------------------------------------------------------------------------------- /src/common/components/cards/visual-helper-toggle.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../../common/styles/fonts.scss'; 4 | 5 | .visual-helper-toggle { 6 | display: flex; 7 | align-items: center; 8 | word-wrap: break-word; 9 | margin: unset; 10 | 11 | label { 12 | @include text-style-body-m; 13 | 14 | margin-right: 8px; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/content/test/page/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as frameTitles from './frame-titles'; 4 | import * as generalNavigation from './general-navigation'; 5 | import { guidance } from './guidance'; 6 | import * as pageTitle from './page-title'; 7 | 8 | export const page = { 9 | guidance, 10 | pageTitle, 11 | frameTitles, 12 | generalNavigation, 13 | }; 14 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/tab-stops-report-instance-list.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../../common/styles/colors.scss'; 4 | @import '../../../common/styles/fonts.scss'; 5 | 6 | .instance-list { 7 | th { 8 | color: $primary-text; 9 | padding-top: 14px; 10 | padding-bottom: 14px; 11 | padding-left: 20px; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/tests/end-to-end/test-resources/clean.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | Page with no automated check failures 8 | 9 | 10 |
11 |

Content

12 |

This page has no automated checks failures.

13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /src/DetailsView/components/tab-stops/data-transfer-view-actions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { AsyncAction } from 'common/flux/async-action'; 5 | 6 | export class DataTransferViewActions { 7 | public readonly showQuickAssessToAssessmentConfirmDialog = new AsyncAction(); 8 | public readonly hideQuickAssessToAssessmentConfirmDialog = new AsyncAction(); 9 | } 10 | -------------------------------------------------------------------------------- /src/common/components/cards/cards-view-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { CreateIssueDetailsTextData } from 'common/types/create-issue-details-text-data'; 5 | 6 | export interface CardsViewStoreData { 7 | isIssueFilingSettingsDialogOpen: boolean; 8 | onIssueFilingSettingsClosedCallback?: () => void; 9 | selectedIssueData?: CreateIssueDetailsTextData; 10 | } 11 | -------------------------------------------------------------------------------- /src/content/adhoc/tabstops/extra-guidance.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { create, GuidanceTitle, React } from '../../common'; 4 | import { whyItMatters } from './why-it-matters'; 5 | 6 | export const extraGuidance = create(({ Markup, Link }) => ( 7 | <> 8 | 9 | 10 | 11 | )); 12 | -------------------------------------------------------------------------------- /src/injected/visualization/null-drawer.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { Drawer, DrawerInitData } from './drawer'; 4 | 5 | export class NullDrawer implements Drawer { 6 | public initialize(drawerData: DrawerInitData): void {} 7 | public isOverlayEnabled: boolean = false; 8 | public drawLayout = async (): Promise => {}; 9 | public eraseLayout(): void {} 10 | } 11 | -------------------------------------------------------------------------------- /src/issue-filing/services/azure-boards/azure-boards-issue-filing-settings.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export type AzureBoardsIssueDetailField = 'reproSteps' | 'description'; 4 | 5 | export type AzureBoardsWorkItemType = 'Bug' | 'Issue'; 6 | 7 | export type AzureBoardsIssueFilingSettings = { 8 | projectURL: string; 9 | issueDetailsField: AzureBoardsIssueDetailField; 10 | }; 11 | -------------------------------------------------------------------------------- /src/scanner/scanner-rule-info.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { HyperlinkDefinition } from 'common/types/hyperlink-definition'; 4 | 5 | export interface ScannerRuleInfo { 6 | id: string; 7 | help: string; 8 | url?: string; 9 | a11yCriteria: HyperlinkDefinition[]; 10 | } 11 | 12 | export interface ScannerRuleInfoMap { 13 | [ruleId: string]: ScannerRuleInfo; 14 | } 15 | -------------------------------------------------------------------------------- /src/tests/unit/tests/DetailsView/components/__snapshots__/next-requirement-button.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`NextRequirementButton renders 1`] = ` 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | `; 15 | -------------------------------------------------------------------------------- /src/tests/unit/tests/packages/accessibility-insights-ui/index.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as index from 'packages/accessibility-insights-ui/index'; 4 | import { UIFactory } from 'packages/accessibility-insights-ui/ui-factory'; 5 | 6 | describe('index', () => { 7 | it('exports UIFactory', () => { 8 | expect(index.UIFactory).toBe(UIFactory); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /tools/strict-null-checks/config.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | const path = require('path'); 4 | const repoRoot = path.join(__dirname, '../../').replace(/\\/g, '/'); 5 | 6 | module.exports = { 7 | repoRoot: repoRoot, 8 | srcRoot: `${repoRoot}/src`, 9 | targetTsconfig: 'tsconfig.strictNullChecks.json', 10 | skippedFiles: new Set([]), 11 | includeTests: false, 12 | }; 13 | -------------------------------------------------------------------------------- /pipeline/e2e-test-from-agent.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. All rights reserved. 2 | # Licensed under the MIT License. 3 | steps: 4 | - script: yarn build:dev 5 | displayName: build:dev 6 | timeoutInMinutes: 5 7 | 8 | - script: yarn playwright install 9 | displayName: install playwright 10 | timeoutInMinutes: 5 11 | 12 | - script: yarn test:e2e --ci 13 | displayName: run e2e tests 14 | timeoutInMinutes: 20 15 | -------------------------------------------------------------------------------- /src/DetailsView/components/nav-link-button.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/common.scss'; 4 | 5 | a, 6 | button { 7 | &.nav-link-button { 8 | &:hover, 9 | &:active, 10 | &:focus, 11 | &:active:hover { 12 | text-decoration: none; 13 | } 14 | @include fluent-forced-color-adjust-override; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/assessments/adaptable-content/test-steps/test-step.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export enum AdaptableContentTestStep { 4 | highContrastMode = 'highContrastMode', 5 | resizeText = 'resizeText', 6 | contrast = 'contrast', 7 | orientation = 'orientation', 8 | reflow = 'reflow', 9 | textSpacing = 'textSpacing', 10 | hoverFocusContent = 'hoverFocusContent', 11 | } 12 | -------------------------------------------------------------------------------- /src/common/components/cards/instance-details-group.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | ul.instance-details-list { 4 | list-style-type: none; 5 | padding-inline-start: unset; 6 | margin-block-start: unset; 7 | margin-block-end: unset; 8 | 9 | > li { 10 | margin-bottom: 16px; 11 | } 12 | 13 | > li:last-child { 14 | margin-bottom: unset; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/common/types/property-bag/link-function-property-bag.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { BagOf, ColumnValueBag } from './column-value-bag'; 4 | 5 | export interface LinkFunctionPropertyBag extends ColumnValueBag { 6 | accessibleName: string; 7 | url: string; 8 | role: string; 9 | ariaAttributes: BagOf; 10 | tabIndex: number; 11 | snippet: string; 12 | } 13 | -------------------------------------------------------------------------------- /src/content/test/contrast/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as graphics from './graphics'; 4 | import { guidance } from './guidance'; 5 | import * as stateChanges from './state-changes'; 6 | import { infoAndExamples as uiComponents } from './ui-components'; 7 | 8 | export const contrast = { 9 | guidance, 10 | stateChanges, 11 | uiComponents, 12 | graphics, 13 | }; 14 | -------------------------------------------------------------------------------- /src/content/test/links/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { guidance } from './guidance'; 4 | import * as labelInName from './label-in-name'; 5 | import * as linkFunction from './link-function'; 6 | import { infoAndExamples as linkPurpose } from './link-purpose'; 7 | 8 | export const links = { 9 | guidance, 10 | linkFunction, 11 | linkPurpose, 12 | labelInName, 13 | }; 14 | -------------------------------------------------------------------------------- /src/packages/accessibility-insights-ui/ui.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/root-level-only/color-definitions.scss'; 4 | @import '../../common/styles/root-level-only/global-styles.scss'; 5 | @import '../../common/styles/common.scss'; 6 | @import '../../views/content/content.scss'; 7 | @import '../../views/page/page.scss'; 8 | @import '../../reports/components/outcome.scss'; 9 | -------------------------------------------------------------------------------- /src/scanner/axe-options.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as Axe from 'axe-core'; 4 | 5 | export interface AxeOptions { 6 | runOnly?: Axe.RunOnly; 7 | pingWaitTime?: number; 8 | } 9 | export type AxeScanContext = string | Document | IncludeExcludeOptions | NodeList; 10 | export interface IncludeExcludeOptions { 11 | include?: string[][]; 12 | exclude?: string[][]; 13 | } 14 | -------------------------------------------------------------------------------- /src/tests/end-to-end/test-resources/color-contrast/poor-color-contrast.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | Poor Color Contrast 10 | 11 | 12 | 13 |

Poor color contrast

14 | 15 | 16 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/is-result-highlight-unavailable.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { isResultHighlightUnavailableWeb } from 'common/is-result-highlight-unavailable'; 4 | 5 | describe('isResultHighlightUnavailableWeb', () => { 6 | test('should always be available', () => { 7 | expect(isResultHighlightUnavailableWeb(null, null)).toEqual(false); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /src/assessments/custom-widgets/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum CustomWidgetsTestStep { 4 | designPattern = 'designPattern', 5 | instructions = 'customWidgetsInstructions', 6 | label = 'customWidgetsLabel', 7 | roleStateProperty = 'roleStateProperty', 8 | cues = 'customWidgetsCues', 9 | keyboardInteraction = 'keyboardInteraction', 10 | } 11 | -------------------------------------------------------------------------------- /src/assessments/semantics/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum SemanticsTestStep { 4 | cssContent = 'cssContent', 5 | tableSemantics = 'tableSemantics', 6 | lists = 'lists', 7 | emphasis = 'emphasis', 8 | quotes = 'quotes', 9 | letterSpacing = 'letterSpacing', 10 | headers = 'headers', 11 | headersAttribute = 'headersAttribute', 12 | } 13 | -------------------------------------------------------------------------------- /src/assessments/visible-focus-order/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum visibleFfocusOrderTestStep { 4 | closingContent = 'closing-content', 5 | focusOrder = 'focus-order', 6 | modalDialogs = 'modal-dialogs', 7 | revealingContent = 'revealing-content', 8 | visibleFocus = 'visible-focus', 9 | focusNotObscured = 'focus-not-obscured', 10 | } 11 | -------------------------------------------------------------------------------- /src/common/components/cards/urls-card-row.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | @import '../../../common/styles/colors.scss'; 5 | 6 | .urls-row-content { 7 | padding-left: 16px; 8 | 9 | li { 10 | list-style-type: disc; 11 | margin-bottom: 4px; 12 | } 13 | } 14 | 15 | .urls-row-content-new-Failure { 16 | color: $negative-outcome; 17 | font-weight: bold; 18 | } 19 | -------------------------------------------------------------------------------- /src/common/components/hamburger-menu-button.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/colors.scss'; 4 | 5 | :global(.high-contrast-theme) { 6 | .hamburger-menu-button { 7 | color: $neutral-alpha-90; 8 | } 9 | 10 | .hamburger-menu-button-callout { 11 | box-shadow: $always-white 0 0 1px 0 !important; 12 | border-radius: unset; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/title-section.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../../common/styles/fonts.scss'; 4 | 5 | .title-section { 6 | margin-top: 56px; 7 | 8 | h1 { 9 | font-weight: $font-weight-semi-bold; 10 | margin-bottom: 24px; 11 | font-size: 21px; 12 | line-height: 32px; 13 | letter-spacing: -0.02em; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/end-to-end/test-resources/tab-stops/out-of-order.html: -------------------------------------------------------------------------------- 1 | 5 | 6 |
7 |
    8 |
  1. Item A
  2. 9 |
  3. Item B
  4. 10 |
  5. Item C
  6. 11 |
  7. Item D
  8. 12 |
13 |
14 | -------------------------------------------------------------------------------- /src/tests/unit/tests/DetailsView/components/overview-content/__snapshots__/overview-heading.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`OverviewHeading match snapshot 1`] = ` 4 | 5 |
9 |

10 | Overview 11 |

12 |
13 | INTRO COMPONENT 14 |
15 |
16 |
17 | `; 18 | -------------------------------------------------------------------------------- /src/common/is-supported-browser.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import UAParser from 'ua-parser-js'; 4 | 5 | export type IsSupportedBrowser = () => boolean; 6 | 7 | export const createSupportedBrowserChecker = (uaParser: UAParser): IsSupportedBrowser => { 8 | return () => { 9 | return !(uaParser.getBrowser().name === 'Edge' && uaParser.getEngine().name === 'EdgeHTML'); 10 | }; 11 | }; 12 | -------------------------------------------------------------------------------- /src/common/types/store-update-message.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { StoreType } from './store-type'; 4 | 5 | export const storeUpdateMessageType = 'STORE_CHANGED'; 6 | 7 | export interface StoreUpdateMessage { 8 | messageType: typeof storeUpdateMessageType; 9 | storeType: StoreType; 10 | storeId: string; 11 | payload: TPayloadType; 12 | tabId?: number; 13 | } 14 | -------------------------------------------------------------------------------- /src/common/utils/id-generator.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export function generateDeterministicContentId(content: string): string { 4 | if (!content) { 5 | return 'empty'; 6 | } 7 | 8 | let hash = 5381; 9 | for (let i = 0; i < content.length; i++) { 10 | hash = (hash << 5) + hash + content.charCodeAt(i); 11 | } 12 | 13 | return (hash >>> 0).toString(36); 14 | } 15 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/fast-pass-title-section.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { NamedFC } from 'common/react/named-fc'; 4 | import * as React from 'react'; 5 | 6 | export const FastPassTitleSection = NamedFC('FastPassTitleSection', () => { 7 | return ( 8 |
9 |

FastPass results

10 |
11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /src/tests/unit/common/blob-provider.test.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { provideBlob } from '../../../common/blob-provider'; 4 | 5 | describe('BlobProviderTest', () => { 6 | test('provideBlob', () => { 7 | const mimeType = 'text/html'; 8 | const blobProvided = provideBlob([''], mimeType); 9 | expect(blobProvided.type).toEqual(mimeType); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/__snapshots__/report-html-generator.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ReportHtmlGenerator generateHtml 1`] = `""`; 4 | 5 | exports[`ReportHtmlGenerator with feedback URL generateHtml includes feedback URL in the output 1`] = `"Feedback"`; 6 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/footer-text-for-unified.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`FooterText renders 1`] = ` 4 | 5 | This automated checks result was generated using app-name app-version (engine-name), a tool that helps debug and find accessibility issues earlier. Get more information & download this tool at 6 | 7 | . 8 | 9 | `; 10 | -------------------------------------------------------------------------------- /src/assessments/keyboard-interaction/test-steps/test-steps.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export const enum KeyboardInteractionTestStep { 4 | keyboardNavigation = 'keyboard-navigation', 5 | noKeyBoardTraps = 'no-keyboard-traps', 6 | onFocus = 'on-focus', 7 | onInput = 'on-input', 8 | noKeystrokeTiming = 'on-keystroke-timing', 9 | characterKeyShortcuts = 'character-key-shortcuts', 10 | } 11 | -------------------------------------------------------------------------------- /src/assessments/language/common/language-attribute-link.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { NewTabLink } from 'common/components/new-tab-link'; 4 | import * as React from 'react'; 5 | 6 | export const LanguageAttributeLink = () => ( 7 | 8 | language attribute 9 | 10 | ); 11 | -------------------------------------------------------------------------------- /src/background/actions/unified-scan-result-actions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { AsyncAction } from 'common/flux/async-action'; 4 | import { UnifiedScanCompletedPayload } from './action-payloads'; 5 | 6 | export class UnifiedScanResultActions { 7 | public readonly scanCompleted = new AsyncAction(); 8 | public readonly getCurrentState = new AsyncAction(); 9 | } 10 | -------------------------------------------------------------------------------- /src/common/insights-window-extensions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { FeatureFlagsController } from 'background/feature-flags-controller'; 4 | import { UserConfigurationController } from 'background/user-configuration-controller'; 5 | 6 | export type InsightsWindowExtensions = { 7 | insightsFeatureFlags: FeatureFlagsController; 8 | insightsUserConfiguration: UserConfigurationController; 9 | }; 10 | -------------------------------------------------------------------------------- /src/content/test/language/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { guidance } from './guidance'; 4 | import * as languageOfPage from './language-of-page'; 5 | import * as languageOfParts from './language-of-parts'; 6 | import * as textDirection from './text-direction'; 7 | 8 | export const language = { 9 | guidance, 10 | languageOfPage, 11 | languageOfParts, 12 | textDirection, 13 | }; 14 | -------------------------------------------------------------------------------- /src/injected/frameCommunicators/window-message.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ErrorMessageContent } from './error-message-content'; 4 | 5 | export interface WindowMessage { 6 | messageId: string; 7 | command: string; 8 | message?: any; 9 | error?: ErrorMessageContent; 10 | messageStableSignature: string; 11 | messageSourceId: string; 12 | messageVersion: string; 13 | } 14 | -------------------------------------------------------------------------------- /src/tests/end-to-end/test-resources/landmarks/mixed-landmarks.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | Landmarks - Mixed 10 | 11 | 12 | 13 |
Banner landmark content
14 |
Main landmark content
15 | 16 | 17 | -------------------------------------------------------------------------------- /.ignoredRevs: -------------------------------------------------------------------------------- 1 | # formatting only commits 2 | 8d512343109cb6202a99f0dad6fe4ce9cc41c1ff 3 | b9644be345674ea80535e494ded806682ef62463 4 | df5a0c3d1acbfc645ada8b29352263f4df46287a 5 | 739c3fc8b749377f46fc140f85352bf8bf0d1029 6 | 94540dc80a08a7e171151f0aab156dbb4a39456a 7 | 7808b6a07295eb22b21eaa4e4e7073f6c74d8460 8 | d13cd490d81e46c32cfd5232d45b4aea5e636c09 9 | d1f9055b7f4c4bbffde3872f89115e90f4025f8d 10 | 278e77aa7cc9a121edd2e52c99f2c90cb13fce0a 11 | 97d655c94f27f82d7cec71674193a57126d486e0 12 | -------------------------------------------------------------------------------- /src/background/actions/launch-panel-state-action.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { AsyncAction } from 'common/flux/async-action'; 4 | import { LaunchPanelType } from 'common/types/store-data/launch-panel-store-data'; 5 | 6 | export class LaunchPanelStateActions { 7 | public readonly setLaunchPanelType = new AsyncAction(); 8 | public readonly getCurrentState = new AsyncAction(); 9 | } 10 | -------------------------------------------------------------------------------- /src/common/components/cards/result-section.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .result-section { 4 | padding-bottom: 24px; 5 | 6 | .title-container { 7 | .collapsible-control::before { 8 | position: relative; 9 | bottom: 2px; 10 | } 11 | } 12 | 13 | > h2 { 14 | margin: 0; 15 | font-size: 17px; 16 | line-height: 24px; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/content/adhoc/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { accessibleNames } from './accessible-names'; 4 | import { color } from './color'; 5 | import { headings } from './headings'; 6 | import { landmarks } from './landmarks'; 7 | import { tabstops } from './tabstops'; 8 | 9 | export const adhoc = { 10 | color, 11 | headings, 12 | landmarks, 13 | tabstops, 14 | accessibleNames, 15 | }; 16 | -------------------------------------------------------------------------------- /src/reports/components/outcome-icon.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { NamedFC } from 'common/react/named-fc'; 4 | 5 | import { outcomeIconMap, OutcomeType } from './outcome-type'; 6 | 7 | interface OutcomeIconProps { 8 | outcomeType: OutcomeType; 9 | } 10 | 11 | export const OutcomeIcon = NamedFC( 12 | 'OutcomeIcon', 13 | props => outcomeIconMap[props.outcomeType], 14 | ); 15 | -------------------------------------------------------------------------------- /src/tests/unit/tests/DetailsView/components/__snapshots__/no-displayable-preview-features-message.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`no displayableFeatureFlags message test the no feature flag message component 1`] = ` 4 | 5 |
8 | No preview features are currently available to manage. Follow this page for future cool features. 9 |
10 |
11 | `; 12 | -------------------------------------------------------------------------------- /src/background/actions/needs-review-scan-result-actions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { AsyncAction } from 'common/flux/async-action'; 4 | import { UnifiedScanCompletedPayload } from './action-payloads'; 5 | 6 | export class NeedsReviewScanResultActions { 7 | public readonly scanCompleted = new AsyncAction(); 8 | public readonly getCurrentState = new AsyncAction(); 9 | } 10 | -------------------------------------------------------------------------------- /src/content/test/landmarks/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { guidance } from './guidance'; 4 | import * as landmarkRoles from './landmark-roles'; 5 | import * as noRepeatingContent from './no-repeating-content'; 6 | import * as primaryContent from './primary-content'; 7 | 8 | export const landmarks = { 9 | guidance, 10 | landmarkRoles, 11 | noRepeatingContent, 12 | primaryContent, 13 | }; 14 | -------------------------------------------------------------------------------- /src/DetailsView/components/assessment-command-bar.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { NamedFC } from 'common/react/named-fc'; 4 | import * as React from 'react'; 5 | 6 | import { CommandBarProps, DetailsViewCommandBar } from './details-view-command-bar'; 7 | 8 | export const AssessmentCommandBar = NamedFC('AssessmentCommandBar', props => { 9 | return ; 10 | }); 11 | -------------------------------------------------------------------------------- /src/common/types/test-view-type.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ContentPageComponent } from 'views/content/content-page'; 4 | 5 | export type TestViewType = 6 | | 'AdhocStatic' 7 | | 'AdhocFailure' 8 | | 'AdhocNeedsReview' 9 | | 'AdhocTabStops' 10 | | 'Assessment'; 11 | export type TestViewOverrides = { 12 | content?: ContentPageComponent; 13 | guidance?: ContentPageComponent; 14 | }; 15 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/footer-text.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`FooterText renders 1`] = ` 4 | 5 | This automated checks result was generated using app-name app-version (axe-core engine-version), a tool that helps debug and find accessibility issues earlier on environmentName. Get more information & download this tool at 6 | 7 | . 8 | 9 | `; 10 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/tool-link.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ToolLink renders 1`] = ` 4 | 5 | 10 | http://aka.ms/AccessibilityInsights 11 | 12 | 13 | `; 14 | -------------------------------------------------------------------------------- /tools/clearly-defined/clearly-defined-exclusions.json: -------------------------------------------------------------------------------- 1 | [ 2 | "@swc/core", 3 | "@testing-library/jest-dom", 4 | "@typescript-eslint/parser", 5 | "-/core-js-bundle", 6 | "-/esbuild", 7 | "-/eslint", 8 | "-/jest-environment-jsdom", 9 | "-/playwright", 10 | "-/postcss", 11 | "-/prettier", 12 | "-/sass", 13 | "-/simple-git", 14 | "-/stylelint", 15 | "-/stylelint-config-standard-scss", 16 | "-/ts-loader", 17 | "-/typed-scss-modules" 18 | ] 19 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | ## Code of Conduct 7 | 8 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 9 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 10 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 11 | -------------------------------------------------------------------------------- /src/DetailsView/components/quick-assess-command-bar.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { NamedFC } from 'common/react/named-fc'; 4 | import * as React from 'react'; 5 | 6 | import { CommandBarProps, DetailsViewCommandBar } from './details-view-command-bar'; 7 | 8 | export const QuickAssessCommandBar = NamedFC('QuickAssessCommandBar', props => { 9 | return ; 10 | }); 11 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/common-mixins.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../../common/styles/colors.scss'; 4 | 5 | @mixin content-size { 6 | max-width: 960px; 7 | margin-right: auto; 8 | margin-left: auto; 9 | } 10 | 11 | @mixin box-shadow { 12 | box-shadow: 13 | 0 0.3px 0.9px rgb(0 0 0 / 10.8%), 14 | 0 1.6px 3.6px rgb(0 0 0 / 13.2%); 15 | border-radius: 4px; 16 | } 17 | -------------------------------------------------------------------------------- /packages/report-e2e-tests/jest.config.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | const baseConfig = require('../../jest.config.base'); 4 | const package = require('./package'); 5 | 6 | module.exports = { 7 | ...baseConfig, 8 | collectCoverage: false, 9 | displayName: package.name, 10 | setupFilesAfterEnv: [...baseConfig.setupFilesAfterEnv, `/src/jest-setup.ts`], 11 | watchPathIgnorePatterns: ['*.snap.html'], 12 | }; 13 | -------------------------------------------------------------------------------- /src/content/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ContentPage } from 'views/content/content-page'; 4 | import { adhoc } from './adhoc'; 5 | import { rules } from './rules'; 6 | import * as strings from './strings'; 7 | import { test } from './test'; 8 | 9 | const content = { 10 | test, 11 | adhoc, 12 | rules, 13 | }; 14 | 15 | export const contentPages = ContentPage.provider(content); 16 | export { strings }; 17 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/automated-checks-title-section.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { NamedFC } from 'common/react/named-fc'; 4 | import * as React from 'react'; 5 | 6 | export const AutomatedChecksTitleSection = NamedFC('AutomatedChecksTitleSection', () => { 7 | return ( 8 |
9 |

Automated checks results

10 |
11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/base-summary-report-section-props.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { ScanMetadata } from 'common/types/store-data/unified-data-interface'; 5 | 6 | export type BaseSummaryReportSectionProps = { 7 | toUtcString: (date: Date) => string; 8 | secondsToTimeString: (seconds: number) => string; 9 | getCollapsibleScript: () => string; 10 | scanMetadata: ScanMetadata; 11 | }; 12 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/content-container.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { NamedFC } from 'common/react/named-fc'; 4 | import * as React from 'react'; 5 | 6 | export const ContentContainer = NamedFC('ContentSection', ({ children }) => { 7 | return ( 8 |
9 |
{children}
10 |
11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/package/reporter-factory.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { Reporter } from 'reports/package/reporter'; 4 | import { reporterFactory } from 'reports/package/reporter-factory'; 5 | 6 | describe('ReporterFactory', () => { 7 | it('returns a valid reporter', () => { 8 | const reporter = reporterFactory(); 9 | 10 | expect(reporter).toBeInstanceOf(Reporter); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /src/common/assessment-data-parser.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { VersionedAssessmentData } from 'common/types/versioned-assessment-data'; 5 | 6 | export class AssessmentDataParser { 7 | public parseAssessmentData = (assessmentData: string): VersionedAssessmentData => { 8 | const loadedAssessmentData: VersionedAssessmentData = JSON.parse(assessmentData); 9 | return loadedAssessmentData; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /src/common/components/left-nav-hamburger-button.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/colors.scss'; 4 | 5 | .left-nav-hamburger-button { 6 | margin-left: 11px; 7 | } 8 | 9 | .high-contrast-theme { 10 | .left-nav-hamburger-button { 11 | color: $neutral-alpha-90; 12 | } 13 | } 14 | 15 | :global(.ms-Button).left-nav-hamburger-button:focus::after { 16 | border: 1px $neutral-0 solid; 17 | } 18 | -------------------------------------------------------------------------------- /src/tests/unit/tests/scanner/__snapshots__/axe-utils.test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`AxeUtils getUniqueSelector Throws if axe.setup has already been invoked (ie, a scan is in progress) 1`] = `"Axe is already setup. Call \`axe.teardown()\` before calling \`axe.setup\` again."`; 4 | 5 | exports[`AxeUtils withAxeSetup Throws if axe.setup has already been invoked (ie, a scan is in progress) 1`] = `"Axe is already setup. Call \`axe.teardown()\` before calling \`axe.setup\` again."`; 6 | -------------------------------------------------------------------------------- /src/tests/unit/tests/views/content/__snapshots__/guidance-title.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`guidance title has correct structure 1`] = ` 4 | 5 | 10 | 11 | Guidance for test - Accessibility Insights for Web 12 | 13 | 14 |

15 | test 16 |

17 |
18 | `; 19 | -------------------------------------------------------------------------------- /src/DetailsView/components/command-bar-buttons-menu.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | @import '../../common/styles/common.scss'; 5 | 6 | .command-bar-buttons-menu-button { 7 | font-size: 16px; 8 | } 9 | 10 | .command-bar-buttons-submenu { 11 | button { 12 | height: 36px; 13 | } 14 | 15 | min-width: fit-content; 16 | } 17 | 18 | .command-bar-buttons-menu { 19 | height: $details-view-command-bar-height; 20 | } 21 | -------------------------------------------------------------------------------- /src/background/actions/data-transfer-actions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { AsyncAction } from 'common/flux/async-action'; 5 | 6 | export class DataTransferActions { 7 | public readonly getCurrentState = new AsyncAction(); 8 | public readonly initiateTransferQuickAssessDataToAssessment = new AsyncAction(); 9 | public readonly finalizeTransferQuickAssessDataToAssessment = new AsyncAction(); 10 | } 11 | -------------------------------------------------------------------------------- /src/background/actions/path-snippet-actions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { AsyncAction } from 'common/flux/async-action'; 5 | 6 | export class PathSnippetActions { 7 | public readonly getCurrentState = new AsyncAction(); 8 | public readonly onAddPath = new AsyncAction(); 9 | public readonly onAddSnippet = new AsyncAction(); 10 | public readonly onClearData = new AsyncAction(); 11 | } 12 | -------------------------------------------------------------------------------- /src/background/actions/permissions-state-actions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { SetAllUrlsPermissionStatePayload } from 'background/actions/action-payloads'; 4 | import { AsyncAction } from 'common/flux/async-action'; 5 | 6 | export class PermissionsStateActions { 7 | public readonly getCurrentState = new AsyncAction(); 8 | public readonly setPermissionsState = new AsyncAction(); 9 | } 10 | -------------------------------------------------------------------------------- /src/common/base-store.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { HandlerReturnType } from 'common/flux/event-handler-list'; 5 | 6 | export interface BaseStore { 7 | getId(): string; 8 | getState(): TState; 9 | addChangedListener(handler: (store: this, args?: unknown) => TReturn): void; 10 | removeChangedListener(handler: (store: this, args?: unknown) => TReturn): void; 11 | } 12 | -------------------------------------------------------------------------------- /src/common/logging/default-logger.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { Logger } from './logger'; 4 | 5 | export const createDefaultLogger = (): Logger => { 6 | return { 7 | log: console.log, 8 | // Note that this can be altered later by ExceptionTelemetryListener, so it's functionally 9 | // important for this to remain a direct reference to console.error. 10 | error: console.error, 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /src/common/types/property-bag/custom-widgets-property-bag.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { BagOf, ColumnValueBag } from './column-value-bag'; 4 | 5 | export interface CustomWidgetPropertyBag extends ColumnValueBag { 6 | role: string; 7 | text: string; // Accessible name 8 | describedBy: string; // Accessible description 9 | ariaCues: BagOf; // ARIA attributes 10 | htmlCues: BagOf; // HTML cues 11 | } 12 | -------------------------------------------------------------------------------- /src/content/test/sensory/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as auditoryCues from './auditory-cues'; 4 | import * as flashing from './flashing'; 5 | import { guidance } from './guidance'; 6 | import * as instructions from './instructions'; 7 | import * as useOfColor from './use-of-color'; 8 | 9 | export const sensory = { 10 | guidance, 11 | auditoryCues, 12 | flashing, 13 | instructions, 14 | useOfColor, 15 | }; 16 | -------------------------------------------------------------------------------- /src/tests/unit/tests/issue-filing/common/__snapshots__/http-query-builder.test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`HTTPQueryBuilder encodes {"name": "[param]", "value": "(value)"} 1`] = `"https://some-test-url?%5Bparam%5D=(value)"`; 4 | 5 | exports[`HTTPQueryBuilder encodes {"name": "a param", "value": "value&"} 1`] = `"https://some-test-url?a%20param=value%26"`; 6 | 7 | exports[`HTTPQueryBuilder encodes {"name": "name?", "value": "value\\""} 1`] = `"https://some-test-url?name%3F=value%22"`; 8 | -------------------------------------------------------------------------------- /src/DetailsView/components/tab-stops-failed-instance-section.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .tab-stops-failure-instance-section { 4 | padding-bottom: 24px; 5 | 6 | .title-container { 7 | .collapsible-control::before { 8 | position: relative; 9 | bottom: 2px; 10 | } 11 | } 12 | 13 | > h2 { 14 | margin: 0; 15 | font-size: 17px; 16 | line-height: 24px; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/common/types/property-bag/property-bag-column-renderer-config.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ColumnValue, ColumnValueBag } from './column-value-bag'; 4 | 5 | export const NoValue = '(no value)'; 6 | export interface PropertyBagColumnRendererConfig { 7 | propertyName: keyof TPropertyBag & string; 8 | displayName: string; 9 | defaultValue?: ColumnValue; 10 | expand?: boolean; 11 | } 12 | -------------------------------------------------------------------------------- /src/content/test/headings/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { guidance } from './guidance'; 4 | import * as headingFunction from './heading-function'; 5 | import { infoAndExamples as headingLevel } from './heading-level'; 6 | import { infoAndExamples as noMissingHeadings } from './no-missing-headings'; 7 | 8 | export const headings = { 9 | guidance, 10 | headingFunction, 11 | headingLevel, 12 | noMissingHeadings, 13 | }; 14 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/content-container.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ContentContainer renders 1`] = ` 4 | 5 |
8 |
11 |
12 | 1 13 |
14 |
17 | 2 18 |
19 |
20 |
21 |
22 | `; 23 | -------------------------------------------------------------------------------- /src/tests/unit/tests/views/content/__snapshots__/content-include.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ContentInclude renders from content 1`] = ` 4 | 5 |
8 | CONTENT FOR TESTING 9 |
10 |
11 | `; 12 | 13 | exports[`ContentInclude renders from path 1`] = ` 14 | 15 |
18 | CONTENT FOR TESTING 19 |
20 |
21 | `; 22 | -------------------------------------------------------------------------------- /src/reports/components/assessment-report-header.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/colors.scss'; 4 | @import '../../common/styles/fonts.scss'; 5 | @import '../../common/styles/common.scss'; 6 | 7 | @import './report-sections/header-section.scss'; 8 | 9 | .report-header-command-bar { 10 | background-color: $neutral-4; 11 | box-shadow: unset; 12 | 13 | .target-page { 14 | color: $neutral-60; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/tests/unit/tests/injected/visualization/null-drawer.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { NullDrawer } from '../../../../../injected/visualization/null-drawer'; 4 | 5 | describe('NullDrawer', () => { 6 | test('null drawer does nothing', async () => { 7 | const testObject = new NullDrawer(); 8 | testObject.initialize(null); 9 | await testObject.drawLayout(); 10 | testObject.eraseLayout(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. All rights reserved. 2 | # Licensed under the MIT License. 3 | 4 | # This prevents inconsistent timeouts during yarn install of the large office fabric fonts package 5 | # See https://github.com/yarnpkg/yarn/issues/5540#issuecomment-374069461 6 | httpTimeout: 120000 7 | 8 | nodeLinker: node-modules 9 | 10 | plugins: 11 | - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs 12 | spec: '@yarnpkg/plugin-workspace-tools' 13 | 14 | yarnPath: .yarn/releases/yarn-3.5.0.cjs 15 | -------------------------------------------------------------------------------- /src/DetailsView/tab-stops-requirements-with-instances.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../common/styles/colors.scss'; 4 | @import '../common/styles/fonts.scss'; 5 | 6 | .collapsible-requirement-details-group { 7 | box-shadow: 0 1px 0 rgb(0 0 0 / 8%); 8 | 9 | .no-instances { 10 | font-style: italic; 11 | padding-left: 20px; 12 | } 13 | 14 | &:global(:not(.collapsed)) { 15 | box-shadow: unset; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/background/actions/injection-actions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { InjectionFailedPayload } from 'background/actions/action-payloads'; 4 | import { AsyncAction } from 'common/flux/async-action'; 5 | 6 | export class InjectionActions { 7 | public readonly injectionCompleted = new AsyncAction(); 8 | public readonly injectionStarted = new AsyncAction(); 9 | public readonly injectionFailed = new AsyncAction(); 10 | } 11 | -------------------------------------------------------------------------------- /src/common/components/guidance-tags.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../styles/colors.scss'; 4 | 5 | .guidance-tags { 6 | span { 7 | font-size: 12px; 8 | font-weight: normal; 9 | padding-top: 2px; 10 | padding-right: 12px; 11 | padding-bottom: 2px; 12 | padding-left: 12px; 13 | color: $pill; 14 | background-color: $pill-background; 15 | border-radius: 120px; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/common/types/store-data/details-view-store-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { CurrentPanel } from './current-panel'; 4 | import { DetailsViewRightContentPanelType } from './details-view-right-content-panel-type'; 5 | 6 | export interface DetailsViewStoreData { 7 | detailsViewRightContentPanel: DetailsViewRightContentPanelType; 8 | currentPanel: CurrentPanel; 9 | contentPath: string | null; 10 | contentTitle: string | null; 11 | } 12 | -------------------------------------------------------------------------------- /src/tests/common/flush-settled-promises.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | // Helper function returns a promise that resolves after all other promise mocks, 5 | // even if they are chained like Promise.resolve().then(...) 6 | // Technically: this is designed to resolve on the next macro-task 7 | export const flushSettledPromises = (): Promise => { 8 | return new Promise((resolve: () => void) => { 9 | setTimeout(resolve, 0); 10 | }); 11 | }; 12 | -------------------------------------------------------------------------------- /src/tests/unit/common/__snapshots__/application-properties-provider.test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`createToolData returns proper tool data 1`] = ` 4 | { 5 | "applicationProperties": { 6 | "environmentName": "test-environment-name", 7 | "name": "test-tool-name", 8 | "resolution": "test-resolution", 9 | "version": "test-tool-version", 10 | }, 11 | "scanEngineProperties": { 12 | "name": "test-engine-name", 13 | "version": "test-engine-version", 14 | }, 15 | } 16 | `; 17 | -------------------------------------------------------------------------------- /src/tests/unit/common/assessment-data-builder.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { AssessmentData } from '../../../common/types/store-data/assessment-result-data'; 4 | import { BaseDataBuilder } from './base-data-builder'; 5 | 6 | export class AssessmentDataBuilder extends BaseDataBuilder { 7 | constructor() { 8 | super(); 9 | this.data.fullAxeResultsMap = {}; 10 | this.data.testStepStatus = {}; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/components/scanning-spinner/__snapshots__/scanning-spinner.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ScanningSpinner renders isScanning = 1`] = ``; 4 | 5 | exports[`ScanningSpinner renders isScanning = 1`] = ` 6 | 7 | 14 | 15 | `; 16 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/report-sections/__snapshots__/results-container.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ResultsContainer renders 1`] = ` 4 | 5 |
8 |
9 | 1 10 |
11 |
14 | 2 15 |
16 |
17 | 20 | 23 |
24 | `; 25 | -------------------------------------------------------------------------------- /src/tests/unit/tests/DetailsView/components/left-nav/__snapshots__/left-nav-icon.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`LeftNavIndexIcon render 1`] = ` 4 | 5 | 8 | 1 9 | 10 | 11 | `; 12 | 13 | exports[`LeftNavStatusIcon render 1`] = ` 14 | 15 | 20 | 21 | `; 22 | -------------------------------------------------------------------------------- /src/tests/unit/tests/assessments/common/__snapshots__/instructions-and-labels-note.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`InstructionsAndLabelsNote renders 1`] = ` 4 | 5 | 6 | Note: Both WCAG 2.0 and 2.1 require a widget's visible label and instructions (if present) to be programmatically determinable. WCAG 2.1 also requires a widget's visible label and instructions (if present) to be included in its accessible name and description. 7 | 8 | 9 | `; 10 | -------------------------------------------------------------------------------- /src/DetailsView/components/automated-checks-command-bar.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { NamedFC } from 'common/react/named-fc'; 4 | import * as React from 'react'; 5 | 6 | import { CommandBarProps, DetailsViewCommandBar } from './details-view-command-bar'; 7 | 8 | export const AutomatedChecksCommandBar = NamedFC( 9 | 'AutomatedChecksCommandBar', 10 | props => { 11 | return ; 12 | }, 13 | ); 14 | -------------------------------------------------------------------------------- /src/common/configuration/configuration-defaults.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { productName } from 'content/strings/application'; 4 | 5 | export const defaults = { 6 | options: { 7 | fullName: productName, 8 | icon16: `icons/brand/blue/brand-blue-16px.png`, 9 | icon48: `icons/brand/blue/brand-blue-48px.png`, 10 | icon128: `icons/brand/blue/brand-blue-128px.png`, 11 | telemetryBuildName: 'unknownBuild', 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /src/content/test/images/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as captchas from './captchas'; 4 | import { guidance } from './guidance'; 5 | import { infoAndExamples as imageFunction } from './image-function'; 6 | import * as imagesOfText from './images-of-text'; 7 | import * as textAlternative from './text-alternative'; 8 | export const images = { 9 | guidance, 10 | imageFunction, 11 | textAlternative, 12 | imagesOfText, 13 | captchas, 14 | }; 15 | -------------------------------------------------------------------------------- /src/injected/tab-stop-requirement-result.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { TabStopRequirementId } from 'types/tab-stop-requirement-info'; 4 | 5 | export type TabStopRequirementResult = { 6 | requirementId: TabStopRequirementId; 7 | description: string; 8 | selector?: string[]; 9 | html?: string; 10 | }; 11 | 12 | export type AutomatedTabStopRequirementResult = TabStopRequirementResult & { 13 | selector: string[]; 14 | html: string; 15 | }; 16 | -------------------------------------------------------------------------------- /src/tests/end-to-end/test-resources/uncommon-characters.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 |

Page with uncommon characters

9 | 10 |

Semicolon

11 |

low-contrast text with semicolon id

12 | 13 |

Comma

14 |

low-contrast text with comma id

15 | 16 | 17 | -------------------------------------------------------------------------------- /src/common/configs/needs-review-rule-resources.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | const needsReviewRuleResourcesPath = 5 | 'https://accessibilityinsights.io/info-examples/web/needs-review'; 6 | 7 | export const isOutcomeNeedsReview = (outcomeType: string): boolean => { 8 | return outcomeType === 'review'; 9 | }; 10 | 11 | export const getNeedsReviewRuleResourcesUrl = (ruleId: string): string => { 12 | return `${needsReviewRuleResourcesPath}/${ruleId}`; 13 | }; 14 | -------------------------------------------------------------------------------- /src/common/message-creators/types/dispatcher.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { TelemetryData } from 'common/extension-telemetry-events'; 4 | import { Message } from 'common/message'; 5 | 6 | export interface ActionMessageDispatcher { 7 | dispatchMessage(message: Message): void; 8 | asyncDispatchMessage(message: Message): Promise; 9 | dispatchType(messageType: string): void; 10 | sendTelemetry(eventName: string, eventData: TelemetryData): void; 11 | } 12 | -------------------------------------------------------------------------------- /src/assessments/auto-pass-if-no-results.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { InstanceIdToInstanceDataMap } from 'common/types/store-data/assessment-result-data'; 4 | import { ManualTestStatus } from 'common/types/store-data/manual-test-status'; 5 | import { isEmpty } from 'lodash'; 6 | 7 | export function autoPassIfNoResults(instanceData: InstanceIdToInstanceDataMap): ManualTestStatus { 8 | return isEmpty(instanceData) ? ManualTestStatus.PASS : ManualTestStatus.UNKNOWN; 9 | } 10 | -------------------------------------------------------------------------------- /src/common/is-result-highlight-unavailable.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { FilterableResult } from 'common/get-card-selection-view-data'; 5 | import { PlatformData } from 'common/types/store-data/unified-data-interface'; 6 | 7 | export type IsResultHighlightUnavailable = ( 8 | result: FilterableResult, 9 | platformInfo: PlatformData | null, 10 | ) => boolean; 11 | 12 | export const isResultHighlightUnavailableWeb: IsResultHighlightUnavailable = () => false; 13 | -------------------------------------------------------------------------------- /src/reports/components/report-sections/report-footer.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { NamedFC } from 'common/react/named-fc'; 4 | import * as React from 'react'; 5 | 6 | export const ReportFooter = NamedFC('ReportFooter', ({ children }) => { 7 | return ( 8 |
9 |
10 | {children} 11 |
12 |
13 | ); 14 | }); 15 | -------------------------------------------------------------------------------- /src/tests/unit/tests/DetailsView/components/__snapshots__/narrow-mode-detector.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`NarrowModeDetector render renders child component properly when narrow mode is disabled: All narrow mode status values should be false 1`] = ` 4 | 14 | `; 15 | -------------------------------------------------------------------------------- /src/background/actions/dev-tools-actions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { AsyncAction } from 'common/flux/async-action'; 4 | import { Target } from 'scanner/iruleresults'; 5 | 6 | export class DevToolActions { 7 | public readonly setDevToolState = new AsyncAction(); 8 | public readonly setInspectElement = new AsyncAction(); 9 | public readonly setFrameUrl = new AsyncAction(); 10 | public readonly getCurrentState = new AsyncAction(); 11 | } 12 | -------------------------------------------------------------------------------- /src/common/types/axe-analyzer-result.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { SingleElementSelector } from 'common/types/store-data/scoping-store-data'; 4 | import { ScanResults } from 'scanner/iruleresults'; 5 | import { DictionaryStringTo } from 'types/common-types'; 6 | 7 | export interface AxeAnalyzerResult { 8 | results: DictionaryStringTo; 9 | originalResult?: ScanResults; 10 | include?: SingleElementSelector[]; 11 | exclude?: SingleElementSelector[]; 12 | } 13 | -------------------------------------------------------------------------------- /src/content/adhoc/tabstops/guidance.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { create, GuidanceTitle, React } from '../../common'; 4 | import { createHowToTest } from './how-to-test'; 5 | import { whyItMatters } from './why-it-matters'; 6 | 7 | export const guidance = create(({ Markup }) => ( 8 | <> 9 | 10 | 11 | 12 | 13 | )); 14 | -------------------------------------------------------------------------------- /src/content/test/timed-events/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as audioControl from './audio-control'; 4 | import * as autoUpdatingContent from './auto-updating-content'; 5 | import { guidance } from './guidance'; 6 | import * as movingContent from './moving-content'; 7 | import * as timeLimits from './time-limits'; 8 | 9 | export const timedEvents = { 10 | guidance, 11 | timeLimits, 12 | movingContent, 13 | autoUpdatingContent, 14 | audioControl, 15 | }; 16 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/components/__snapshots__/guidance-tags.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`GuidanceTags renders tags 1`] = ` 4 | 5 | 8 | 9 | some display text 10 | 11 | 12 | some other text 13 | 14 | 15 | 16 | `; 17 | 18 | exports[`GuidanceTags tags is: [] 1`] = ``; 19 | 20 | exports[`GuidanceTags tags is: null 1`] = ``; 21 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/__snapshots__/summary-report-head.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`SummaryReportHead renders 1`] = ` 4 | 5 | 8 | 9 | Accessibility Insights automated checks result 10 | 11 | 14 | 17 | 18 | `; 19 | -------------------------------------------------------------------------------- /src/tests/unit/tests/reports/components/summary-report-head.test.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { render } from '@testing-library/react'; 4 | import * as React from 'react'; 5 | import { SummaryReportHead } from 'reports/components/summary-report-head'; 6 | 7 | describe('SummaryReportHead', () => { 8 | it('renders', () => { 9 | const renderResult = render(); 10 | expect(renderResult.asFragment()).toMatchSnapshot(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/general_question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: General Question 3 | about: This is a template for people to ask questions that don't fit into any other issue categories 4 | title: '' 5 | labels: question 6 | assignees: '' 7 | --- 8 | 9 | **We encourage tool related questions to be asked on stackoverflow.com and tagged with `accessibility-insights`.** 10 | 11 | ## Your question here 12 | 16 | -------------------------------------------------------------------------------- /src/background/actions/details-view-actions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { AsyncAction } from 'common/flux/async-action'; 4 | import { DetailsViewRightContentPanelType } from '../../common/types/store-data/details-view-right-content-panel-type'; 5 | 6 | export class DetailsViewActions { 7 | public readonly setSelectedDetailsViewRightContentPanel = 8 | new AsyncAction(); 9 | public readonly getCurrentState = new AsyncAction(); 10 | } 11 | -------------------------------------------------------------------------------- /src/common/components/gear-menu-button.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/colors.scss'; 4 | 5 | :global(.ms-Button).gear-menu-button:focus::after { 6 | border: 1px $neutral-0 solid; 7 | } 8 | 9 | :global(.high-contrast-theme) { 10 | .gear-menu-button { 11 | color: $neutral-alpha-90; 12 | } 13 | 14 | .gear-menu-button-callout { 15 | box-shadow: $always-white 0 0 1px 0 !important; 16 | border-radius: unset; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/debug-tools/controllers/debug-tools-controller.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { BrowserAdapter } from 'common/browser-adapters/browser-adapter'; 4 | 5 | export const debugToolUrl = '/debug-tools/debug-tools.html'; 6 | 7 | export class DebugToolsController { 8 | constructor(private readonly browserAdapter: BrowserAdapter) {} 9 | 10 | public async showDebugTools(): Promise { 11 | await this.browserAdapter.createTabInNewWindow(debugToolUrl); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/debug-tools/debug-tools.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/tests/unit/tests/DetailsView/components/__snapshots__/target-page-hidden-bar.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`TargetPageHiddenBar renders per snapshot to indicate that the target page is hidden 1`] = ` 4 | 5 | 9 | The Target page is in a hidden state. For better performance, use the Target page link above to make the page visible. 10 | 11 | 12 | `; 13 | -------------------------------------------------------------------------------- /src/tests/unit/tests/DetailsView/components/left-nav/__snapshots__/test-view-left-nav-link.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`TestViewLeftNavLink renders 1`] = ` 4 | 5 | 19 | 20 | `; 21 | -------------------------------------------------------------------------------- /src/tests/unit/tests/injected/visualization/__snapshots__/highlight-box.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`HighlightBox renders null when boxConfig is null 1`] = ``; 4 | 5 | exports[`HighlightBox renders with appropriate styles/elements when boxConfig is set 1`] = ` 6 | 7 |
11 | some text 12 |
13 |
14 | `; 15 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | const baseModule = require('./eslintrc.base'); 4 | module.exports = { 5 | ...baseModule, 6 | root: true, 7 | ignorePatterns: [ 8 | 'node_modules/', 9 | '**/*bundle.js', 10 | 'dist/', 11 | 'drop/', 12 | 'extension/', 13 | 'packages/', 14 | 'test-results/', 15 | 'src/DetailsView/components/generated-validate-assessment-json.js', 16 | 'replace-plugin.js', 17 | ], 18 | }; 19 | -------------------------------------------------------------------------------- /new-appx.ps1: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. All rights reserved. 2 | # Licensed under the MIT License. 3 | 4 | if (Test-Path ./drop/productionEdge) { Remove-Item ./drop/productionEdge -Recurse } 5 | if (Test-Path ./drop/productionEdge.appx) { Remove-Item ./drop/productionEdge.appx } 6 | Copy-Item ./drop/extension/production ./drop/productionEdge -Recurse 7 | Copy-Item ./AppXManifest.xml ./drop/productionEdge/AppXManifest.xml 8 | &"c:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\makeappx.exe" pack /h SHA256 /d .\drop\productionEdge /p .\drop\productionEdge.appx 9 | -------------------------------------------------------------------------------- /src/DetailsView/tab-stops-requirement-result.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | import { TabStopRequirementId } from 'types/tab-stop-requirement-info'; 5 | 6 | export interface TabStopsRequirementResultInstance { 7 | id: string; 8 | description: string; 9 | } 10 | export interface TabStopsRequirementResult { 11 | id: TabStopRequirementId; 12 | description: string; 13 | name: string; 14 | instances: TabStopsRequirementResultInstance[]; 15 | isExpanded: boolean; 16 | } 17 | -------------------------------------------------------------------------------- /src/common/configuration/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { GlobalVariableConfiguration } from 'common/configuration/global-variable-configuration'; 4 | import { ConfigAccessor, ConfigMutator } from './configuration-types'; 5 | 6 | const globalVariableConfig = new GlobalVariableConfiguration(); 7 | 8 | export const config = globalVariableConfig as ConfigAccessor; 9 | 10 | // This should **only** be used by tests 11 | export const configMutator = globalVariableConfig as ConfigMutator; 12 | -------------------------------------------------------------------------------- /src/common/react/named-fc.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as React from 'react'; 4 | 5 | export type ReactFCWithDisplayName

= React.FC> & { 6 | displayName: string; 7 | }; 8 | 9 | export function NamedFC

( 10 | displayName: string, 11 | component: React.FC>, 12 | ): ReactFCWithDisplayName

{ 13 | component.displayName = displayName; 14 | 15 | return component as ReactFCWithDisplayName

; 16 | } 17 | -------------------------------------------------------------------------------- /src/issue-filing/common/markup/markup-formatter.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | export type MarkupFormatter = { 5 | snippet(text: string): string; 6 | link(href: string, text?: string): string; 7 | sectionHeader(text: string): string; 8 | howToFixSection(failureSummary: string): string; 9 | relatedPaths(relatedPaths: string[]): string; 10 | sectionHeaderSeparator(): string | null; 11 | footerSeparator(): string | null; 12 | sectionSeparator(): string; 13 | }; 14 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/components/__snapshots__/issue-filing-needs-settings-help-text.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`IssueFilingNeedsSettingsHelpTextTest render with isOpen = false 1`] = ``; 4 | 5 | exports[`IssueFilingNeedsSettingsHelpTextTest render with isOpen = true 1`] = ` 6 | 7 |

14 |
15 | `; 16 | -------------------------------------------------------------------------------- /pipeline/install-node-prerequisites.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. All rights reserved. 2 | # Licensed under the MIT License. 3 | steps: 4 | - task: NodeTool@0 5 | inputs: 6 | # Keep this in sync with /.github/workflows/ci.yml 7 | versionSpec: '20.17.0' 8 | displayName: use node 20.17.0 9 | timeoutInMinutes: 2 10 | retryCountOnTaskFailure: 2 11 | 12 | - script: yarn install --immutable 13 | displayName: install packages and dependencies 14 | timeoutInMinutes: 10 15 | retryCountOnTaskFailure: 2 16 | -------------------------------------------------------------------------------- /src/background/storage-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { FeatureFlagStoreData } from 'common/types/store-data/feature-flag-store-data'; 4 | import { LaunchPanelType } from 'common/types/store-data/launch-panel-store-data'; 5 | import { InstallationData } from './installation-data'; 6 | 7 | export interface LocalStorageData { 8 | url?: string; 9 | featureFlags?: FeatureFlagStoreData; 10 | launchPanelSetting?: LaunchPanelType; 11 | installationData?: InstallationData; 12 | } 13 | -------------------------------------------------------------------------------- /src/common/icons/restore-icon.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as React from 'react'; 4 | 5 | import { NamedFC } from '../react/named-fc'; 6 | 7 | const d = 8 | 'M2048 1638h-410v410H0V410h410V0h1638v1638zM1434 614H205v1229h1229V614zm409-409H614v205h1024v1024h205V205z'; 9 | 10 | export const RestoreIcon = NamedFC('RestoreIcon', () => ( 11 | 14 | )); 15 | -------------------------------------------------------------------------------- /src/content/test/errors/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as errorIdentification from './error-identification'; 4 | import * as errorPrevention from './error-prevention'; 5 | import * as errorSuggestion from './error-suggestion'; 6 | import { guidance } from './guidance'; 7 | import * as statusMessages from './status-messages'; 8 | 9 | export const errors = { 10 | guidance, 11 | errorIdentification, 12 | errorSuggestion, 13 | errorPrevention, 14 | statusMessages, 15 | }; 16 | -------------------------------------------------------------------------------- /src/views/page/page.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | @import '../../common/styles/root-level-only/color-definitions.scss'; 4 | @import '../../common/styles/root-level-only/global-styles.scss'; 5 | @import '../../common/styles/common.scss'; 6 | 7 | body { 8 | overflow: auto; 9 | margin: 0; 10 | background: $neutral-0; 11 | color: $neutral-100; 12 | font-family: $font-family; 13 | display: flex; 14 | flex-direction: column; 15 | } 16 | 17 | main { 18 | width: 100%; 19 | } 20 | -------------------------------------------------------------------------------- /src/common/components/new-tab-link.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { ILinkProps, Link } from '@fluentui/react'; 4 | import { css } from '@fluentui/utilities'; 5 | import * as React from 'react'; 6 | 7 | import { NamedFC } from '../react/named-fc'; 8 | 9 | export const NewTabLink = NamedFC('NewTabLink', ({ className, ...props }) => { 10 | const classNames = ['insights-link', className]; 11 | 12 | return ; 13 | }); 14 | -------------------------------------------------------------------------------- /src/common/types/displayable-visualization-type-data.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export interface DisplayableVisualizationTypeData { 4 | title: string; 5 | subtitle?: JSX.Element; 6 | 7 | // populated if-and-only-if visualization is for an ad-hoc tool 8 | adHoc: AdHocDisplayableVisualizationTypeData | null; 9 | } 10 | 11 | export interface AdHocDisplayableVisualizationTypeData { 12 | enableMessage: string; 13 | toggleLabel: string; 14 | linkToDetailsViewText: string; 15 | } 16 | -------------------------------------------------------------------------------- /src/injected/bounding-rect.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | // These are the subsets of the native DOMRect/ClientRect types that we use in practice. 5 | // Using smaller interfaces makes it easier to stub them during tests. 6 | 7 | export type BoundingRect = { 8 | left: number; 9 | right: number; 10 | top: number; 11 | bottom: number; 12 | width: number; 13 | height: number; 14 | }; 15 | 16 | export type BoundingRectOffset = { 17 | left: number; 18 | top: number; 19 | }; 20 | -------------------------------------------------------------------------------- /src/tests/end-to-end/common/page-controllers/content-page.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as Playwright from 'playwright'; 4 | import { Page, PageOptions } from './page'; 5 | 6 | export class ContentPage extends Page { 7 | constructor(underlyingPage: Playwright.Page, options?: PageOptions) { 8 | super(underlyingPage, options); 9 | } 10 | } 11 | 12 | export function contentPageRelativeUrl(contentPath: string): string { 13 | return `insights.html#/content/${contentPath}`; 14 | } 15 | -------------------------------------------------------------------------------- /src/tests/unit/common/base-data-builder.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | export abstract class BaseDataBuilder { 4 | protected data: T; 5 | 6 | constructor() { 7 | this.data = {} as T; 8 | } 9 | 10 | public build(): T { 11 | return this.data; 12 | } 13 | 14 | // tslint:disable-next-line: no-reserved-keywords 15 | public with

(property: P, value: T[P]): this { 16 | this.data[property] = value; 17 | return this; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/background/actions/content-actions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { AsyncAction } from 'common/flux/async-action'; 4 | import { BaseActionPayload } from './action-payloads'; 5 | 6 | export interface ContentPayload extends BaseActionPayload { 7 | contentPath: string; 8 | contentTitle: string; 9 | } 10 | 11 | export class ContentActions { 12 | public readonly openContentPanel = new AsyncAction(); 13 | public readonly closeContentPanel = new AsyncAction(); 14 | } 15 | -------------------------------------------------------------------------------- /src/injected/visualization/tabbed-item.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { FocusIndicator } from './focus-indicator'; 4 | 5 | export interface TabbedItem { 6 | selector?: string; 7 | element: Element | null; 8 | focusIndicator?: FocusIndicator; 9 | tabOrder: number; 10 | shouldRedraw?: boolean; 11 | isFailure?: boolean; 12 | itemType?: TabbedItemType; 13 | } 14 | 15 | export enum TabbedItemType { 16 | MissingItem = 'MissingItem', 17 | ErroredItem = 'ErroredItem', 18 | } 19 | -------------------------------------------------------------------------------- /packages/validator/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "accessibility-insights-assessment-validator", 3 | "version": "1.0.0", 4 | "description": "Generates a JSON validator for assessment data", 5 | "license": "MIT", 6 | "files": [ 7 | "../../LICENSE", 8 | "drop", 9 | "README.md" 10 | ], 11 | "main": "drop/index.js", 12 | "scripts": { 13 | "build": "grunt build-package-validator" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/Microsoft/accessibility-insights-web" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/common/components/cards/rich-resolution-content.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | .multi-line-text-yes-bullet { 4 | padding-left: 16px; 5 | 6 | li { 7 | list-style-type: disc; 8 | margin-bottom: 4px; 9 | } 10 | } 11 | 12 | .multi-line-text-no-bullet { 13 | padding-left: 0; 14 | list-style: none; 15 | 16 | li:not(:last-child) { 17 | margin-bottom: 4px; 18 | } 19 | } 20 | 21 | .combination-lists { 22 | flex-direction: column; 23 | display: flex; 24 | } 25 | -------------------------------------------------------------------------------- /src/tests/unit/tests/common/components/__snapshots__/copy-issue-details-button.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`CopyIssueDetailsButtonTest render 1`] = ` 4 | 5 |

9 | 12 | 13 |
16 | Copy failure details 17 |
18 |
19 | 20 | `; 21 | -------------------------------------------------------------------------------- /src/scanner/role-utils.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import * as axe from 'axe-core'; 4 | 5 | export class RoleUtils { 6 | public static isValidRoleIfPresent( 7 | node: HTMLElement, 8 | options?: any, 9 | virtualNode?: any, 10 | context?: any, 11 | ): boolean { 12 | const role = node.getAttribute('role'); 13 | if (role === null) { 14 | return true; 15 | } 16 | return axe.commons.aria.lookupTable.role[role] !== undefined; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/tests/unit/common/tab-store-data-builder.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | import { TabStore } from 'background/stores/tab-store'; 4 | import { TabStoreData } from '../../../common/types/store-data/tab-store-data'; 5 | import { BaseDataBuilder } from './base-data-builder'; 6 | 7 | export class TabStoreDataBuilder extends BaseDataBuilder { 8 | constructor() { 9 | super(); 10 | this.data = new TabStore(null!, null!, null!, null!, null!, null!, null!).getDefaultState(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/tests/unit/tests/DetailsView/components/overview-content/__snapshots__/overview-help-section.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`OverviewHelpSection help text is shown properly 1`] = ` 4 | 5 |
8 |

11 | Help 12 |

13 | 17 |
18 | ABOUT OVERVIEW 19 |
20 |
21 |
22 | `; 23 | --------------------------------------------------------------------------------