Skip to content

Commit

Permalink
fix(medium-pass-1): fix keyboard navigation getAnalyzer by using the …
Browse files Browse the repository at this point in the history
…config that was passed in (#6251)

#### Details

The keyboard-navigation getAnalyzer call was missed in #6230.

##### Motivation

Feature work.

##### Context

This fixes an issue where the visualization for keyboard-navigation does
not show up for quick assess; assessment remained unaffected.

#### Pull request checklist
<!-- If a checklist item is not applicable to this change, write "n/a"
in the checkbox -->
- [ ] Addresses an existing issue: #0000
- [x] Ran `yarn null:autoadd`
- [x] Ran `yarn fastpass`
- [x] Added/updated relevant unit test(s) (and ran `yarn test`)
- [x] Verified code coverage for the changes made. Check coverage report
at: `<rootDir>/test-results/unit/coverage`
- [x] PR title *AND* final merge commit title both start with a semantic
tag (`fix:`, `chore:`, `feat(feature-name):`, `refactor:`). See
`CONTRIBUTING.md`.
- [ ] (UI changes only) Added screenshots/GIFs to description above
- [ ] (UI changes only) Verified usability with NVDA/JAWS
  • Loading branch information
waabid authored Dec 7, 2022
1 parent de5dea5 commit 09a5b70
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

import { Messages } from 'common/messages';
import { VisualizationType } from 'common/types/visualization-type';
import { generateUID } from 'common/uid-generator';
import { link } from 'content/link';
import * as content from 'content/test/keyboard/keyboard-navigation';
import { RestartScanVisualHelperToggle } from 'DetailsView/components/restart-scan-visual-helper-toggle';
import { FocusAnalyzerConfiguration } from 'injected/analyzers/analyzer';
import { AnalyzerProvider } from 'injected/analyzers/analyzer-provider';
import { VisualizationInstanceProcessor } from 'injected/visualization-instance-processor';
import * as React from 'react';
import { ManualTestRecordYourResults } from '../../common/manual-test-record-your-results';
Expand Down Expand Up @@ -73,14 +73,8 @@ export const KeyboardNavigation: Requirement = {
isManual: true,
...content,
guidanceLinks: [link.WCAG_2_1_1],
getAnalyzer: provider =>
provider.createFocusTrackingAnalyzer({
key: KeyboardInteractionTestStep.keyboardNavigation,
testType: VisualizationType.KeyboardInteraction,
analyzerMessageType: Messages.Assessment.AssessmentScanCompleted,
analyzerProgressMessageType: Messages.Assessment.ScanUpdate,
analyzerTerminatedMessageType: Messages.Assessment.TrackingCompleted,
}),
getAnalyzer: (provider: AnalyzerProvider, analyzerConfig: FocusAnalyzerConfiguration) =>
provider.createFocusTrackingAnalyzer(analyzerConfig),
getVisualHelperToggle: props => <RestartScanVisualHelperToggle {...props} />,
visualizationInstanceProcessor: VisualizationInstanceProcessor.addOrder,
doNotScanByDefault: true,
Expand Down

0 comments on commit 09a5b70

Please sign in to comment.