Skip to content

Commit 09a5b70

Browse files
authored
fix(medium-pass-1): fix keyboard navigation getAnalyzer by using the 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
1 parent de5dea5 commit 09a5b70

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/assessments/keyboard-interaction/test-steps/keyboard-navigation.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
import { Messages } from 'common/messages';
5-
import { VisualizationType } from 'common/types/visualization-type';
64
import { generateUID } from 'common/uid-generator';
75
import { link } from 'content/link';
86
import * as content from 'content/test/keyboard/keyboard-navigation';
97
import { RestartScanVisualHelperToggle } from 'DetailsView/components/restart-scan-visual-helper-toggle';
8+
import { FocusAnalyzerConfiguration } from 'injected/analyzers/analyzer';
9+
import { AnalyzerProvider } from 'injected/analyzers/analyzer-provider';
1010
import { VisualizationInstanceProcessor } from 'injected/visualization-instance-processor';
1111
import * as React from 'react';
1212
import { ManualTestRecordYourResults } from '../../common/manual-test-record-your-results';
@@ -73,14 +73,8 @@ export const KeyboardNavigation: Requirement = {
7373
isManual: true,
7474
...content,
7575
guidanceLinks: [link.WCAG_2_1_1],
76-
getAnalyzer: provider =>
77-
provider.createFocusTrackingAnalyzer({
78-
key: KeyboardInteractionTestStep.keyboardNavigation,
79-
testType: VisualizationType.KeyboardInteraction,
80-
analyzerMessageType: Messages.Assessment.AssessmentScanCompleted,
81-
analyzerProgressMessageType: Messages.Assessment.ScanUpdate,
82-
analyzerTerminatedMessageType: Messages.Assessment.TrackingCompleted,
83-
}),
76+
getAnalyzer: (provider: AnalyzerProvider, analyzerConfig: FocusAnalyzerConfiguration) =>
77+
provider.createFocusTrackingAnalyzer(analyzerConfig),
8478
getVisualHelperToggle: props => <RestartScanVisualHelperToggle {...props} />,
8579
visualizationInstanceProcessor: VisualizationInstanceProcessor.addOrder,
8680
doNotScanByDefault: true,

0 commit comments

Comments
 (0)