Skip to content

Commit

Permalink
fix: set wizard stepnav item aria-controls attribute to wizard page id
Browse files Browse the repository at this point in the history
partially fixes VPAT-805 (other issues are in datagrid filters)
  • Loading branch information
kevinbuhmann committed Sep 19, 2022
1 parent 19a1250 commit 6705edd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions projects/angular/src/wizard/wizard-stepnav-item.spec.ts
Expand Up @@ -273,11 +273,11 @@ export default function (): void {
});

it('should have aria-controls attribute', () => {
const stepNavItemId = testItemComponent.id;
const pageId = testItemComponent.page.id;

expect(myStepnavItem.hasAttribute('aria-controls')).toBeTruthy('stepnav item should have aria-controls attr');
const myAriaControls = myStepnavItem.getAttribute('aria-controls');
expect(myAriaControls).toBe(stepNavItemId, 'aria-controls should contain id');
expect(myAriaControls).toBe(pageId, 'aria-controls should contain page id');
});

it('should add disabled attribute when isDisabled return true', () => {
Expand Down
2 changes: 1 addition & 1 deletion projects/angular/src/wizard/wizard-stepnav-item.ts
Expand Up @@ -39,7 +39,7 @@ import { ClrWizardPage } from './wizard-page';
host: {
'[id]': 'id',
'[attr.aria-current]': 'stepAriaCurrent',
'[attr.aria-controls]': 'id',
'[attr.aria-controls]': 'page.id',
'[class.clr-nav-link]': 'true',
'[class.nav-item]': 'true',
'[class.active]': 'isCurrent',
Expand Down

0 comments on commit 6705edd

Please sign in to comment.