Skip to content

Commit 6950f64

Browse files
committed
Fix aria labels and tests
1 parent eb2198b commit 6950f64

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/views/manage-solution/view/components/manage-solution.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ describe('ContextSelection', () => {
194194
}
195195
}
196196

197-
expect(listener).toHaveBeenCalledTimes(5);
197+
expect(listener).toHaveBeenCalledTimes(6);
198198
expect(listener).toHaveBeenCalledWith({
199199
type: 'OPEN_FILE',
200200
path: manageSolutionTargetDocsUrl,

src/views/manage-solution/view/components/manage-solution.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,13 @@ export const ManageSolution = (props: ManageSolutionProps) => {
273273

274274
const showCoreSelector = state.solutionData.availableCoreNames !== undefined && state.solutionData.availableCoreNames.length > 1;
275275
const debugAdapterConfigurationDocsUrl = 'https://mdk-packs.github.io/vscode-cmsis-solution-docs/debug.html#configure-run-and-debug';
276-
const externalLink = (link: string, title: string, external?: boolean): React.JSX.Element => {
276+
const externalLink = (link: string, aria: string, external?: boolean): React.JSX.Element => {
277277
return (<Button
278278
color="default"
279279
variant="link"
280280
style={{ padding: '0px 12px' }}
281-
title={title}
282-
aria-label={title}
281+
title={link}
282+
aria-label={aria}
283283
onClick={(e) => {
284284
e.preventDefault();
285285
e.stopPropagation();
@@ -355,7 +355,7 @@ export const ManageSolution = (props: ManageSolutionProps) => {
355355
<section className="debug-adapter">
356356
<div className='manage-solution-header'>
357357
<h3>Debug Adapter for Target {state.solutionData.selectedTarget?.name}{state.solutionData.selectedTarget?.selectedSet && `@${state.solutionData.selectedTarget?.selectedSet}`}</h3>
358-
{externalLink(debugAdapterConfigurationDocsUrl, debugAdapterConfigurationDocsUrl, true)}
358+
{externalLink(debugAdapterConfigurationDocsUrl, 'Debug Adapter Configuration', true)}
359359
</div>
360360

361361
<table>

0 commit comments

Comments
 (0)