Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Fix repeater missing aria attributes #1758

Merged
merged 48 commits into from
Sep 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
3f4222e
Resolving Card action bar still visable after hiding with *ngIf #1421
blackbaud-conorwright Mar 7, 2018
a450054
Addressed PR style comments
blackbaud-conorwright Mar 8, 2018
4b809aa
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright Mar 9, 2018
d55f351
Merge branch 'master' into master
Blackbaud-SteveBrush Mar 9, 2018
833bcc7
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright Mar 12, 2018
b553659
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright Mar 15, 2018
ab82ba3
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright Mar 19, 2018
db21c76
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright Mar 27, 2018
a282a86
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright Mar 30, 2018
d210c2b
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright Apr 10, 2018
35e789d
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright Apr 17, 2018
636c5dd
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright Apr 23, 2018
bdc97a6
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright May 1, 2018
6104aaf
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright May 2, 2018
37f50ec
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright May 8, 2018
76279cd
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright May 14, 2018
2324e90
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright May 16, 2018
d48b8f2
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright May 23, 2018
b2e318a
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright May 25, 2018
8d52945
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright May 25, 2018
194e01f
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright Jun 6, 2018
2d5e1e4
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright Jun 12, 2018
9eb6aaa
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright Jun 13, 2018
c5e5ca3
added missing aria labels to sky-repeater and tests
blackbaud-conorwright Jun 25, 2018
c711d7e
Merge remote-tracking branch 'upstream/master' into fix-repeater-miss…
blackbaud-conorwright Jun 25, 2018
cd451ae
swapped section role to be region
blackbaud-conorwright Jun 27, 2018
60275cb
Merge remote-tracking branch 'upstream/master' into fix-repeater-miss…
blackbaud-conorwright Jun 29, 2018
a52272b
Merge branch 'master' into fix-repeater-missing-aria-attributes
blackbaud-conorwright Jul 11, 2018
add3b2b
Merge branch 'master' into fix-repeater-missing-aria-attributes
blackbaud-conorwright Jul 11, 2018
5b9d8d2
Merge branch 'master' into fix-repeater-missing-aria-attributes
blackbaud-conorwright Jul 18, 2018
1552f2a
ignored blur on colorinput
blackbaud-conorwright Jul 30, 2018
f7bc018
Merge remote-tracking branch 'upstream/master' into fix-repeater-miss…
blackbaud-conorwright Jul 30, 2018
ba19e87
Merge branch 'master' into fix-repeater-missing-aria-attributes
blackbaud-conorwright Jul 31, 2018
b414a04
Merge branch 'master' into fix-repeater-missing-aria-attributes
blackbaud-conorwright Aug 2, 2018
34b41a5
Merge branch 'master' into fix-repeater-missing-aria-attributes
blackbaud-conorwright Sep 6, 2018
603dbf4
Merge branch 'master' into fix-repeater-missing-aria-attributes
blackbaud-conorwright Sep 12, 2018
3b2bad3
Merge branch 'master' into fix-repeater-missing-aria-attributes
blackbaud-conorwright Sep 13, 2018
67d72bc
changed section to div and removed role
blackbaud-conorwright Sep 14, 2018
c7ca6c2
removed h1 tag so users can choose their own header if at all
blackbaud-conorwright Sep 17, 2018
b1b9b7d
Merge branch 'master' into fix-repeater-missing-aria-attributes
blackbaud-conorwright Sep 17, 2018
30dbd67
Merge branch 'master' into fix-repeater-missing-aria-attributes
Blackbaud-AlexKingman Sep 18, 2018
43bfcd6
Merge branch 'master' into fix-repeater-missing-aria-attributes
Blackbaud-AlexKingman Sep 18, 2018
9745d7f
fixed line-height shift on repeater title
blackbaud-conorwright Sep 18, 2018
c2ab92f
Merge branch 'master' into fix-repeater-missing-aria-attributes
Blackbaud-TrevorBurch Sep 20, 2018
f2af9ad
fixed to use color variable
blackbaud-conorwright Sep 21, 2018
641b90c
Merge remote-tracking branch 'origin/master' into fix-repeater-missin…
blackbaud-conorwright Sep 21, 2018
0e07478
Merge branch 'master' into fix-repeater-missing-aria-attributes
blackbaud-conorwright Sep 24, 2018
fe32036
Merge branch 'master' into fix-repeater-missing-aria-attributes
Blackbaud-SteveBrush Sep 25, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/modules/colorpicker/colorpicker-input.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export class SkyColorpickerInputDirective
this.writeModelValue(this.modelValue);
}

/* istanbul ignore next */
@HostListener('blur')
public onBlur(event: any) {
/*istanbul ignore next */
Expand Down
15 changes: 10 additions & 5 deletions src/modules/repeater/repeater-item.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<section
<div
class="sky-repeater-item sky-padding-even-default"
[ngClass]="{
'sky-repeater-item-collapsible': isCollapsible,
Expand Down Expand Up @@ -29,19 +29,24 @@
[hidden]="titleEl.children.length === 0"
(click)="headerClick()"
>
<h1 class="sky-repeater-item-title sky-emphasized" #titleEl>
<div class="sky-repeater-item-title sky-emphasized" #titleEl>
<ng-content select="sky-repeater-item-title"></ng-content>
</h1>
</div>
<div class="sky-repeater-item-chevron" [hidden]="!isCollapsible">
<sky-chevron
[attr.aria-controls]="contentId"
[attr.aria-expanded]="isExpanded"
[direction]="isExpanded ? 'up' : 'down'"
(directionChange)="chevronDirectionChange($event)"
>
</sky-chevron>
</div>
</header>
<div class="sky-repeater-item-content" [@skyAnimationSlide]="slideDirection">
<div
class="sky-repeater-item-content"
[id]="contentId"
[@skyAnimationSlide]="slideDirection">
<ng-content select="sky-repeater-item-content"></ng-content>
</div>
</div>
</section>
</div>
2 changes: 2 additions & 0 deletions src/modules/repeater/repeater-item.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
.sky-repeater-item-title {
margin: 0;
flex-grow: 1;
line-height: 1.1;
color: $sky-text-color-default;
}

::ng-deep sky-repeater-item-content {
Expand Down
3 changes: 3 additions & 0 deletions src/modules/repeater/repeater-item.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ import {
SkyRepeaterService
} from './repeater.service';

let nextId: number = 0;

@Component({
selector: 'sky-repeater-item',
styleUrls: ['./repeater-item.component.scss'],
templateUrl: './repeater-item.component.html',
animations: [skyAnimationSlide]
})
export class SkyRepeaterItemComponent {
public contentId: string = `sky-radio-content-${++nextId}`;

public get isExpanded(): boolean {
return this._isExpanded;
Expand Down
19 changes: 13 additions & 6 deletions src/modules/repeater/repeater.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ describe('Repeater item component', () => {
})
);

it('should have aria-control set pointed at content', fakeAsync(() => {
let fixture = TestBed.createComponent(RepeaterTestComponent);
let el = fixture.nativeElement;

fixture.detectChanges();
tick();

expect(el.querySelector('sky-chevron').getAttribute('aria-controls'))
.toBe(el.querySelector('.sky-repeater-item-content').getAttribute('id'));
}));

describe('with expand mode of "single"', () => {
it('should collapse other items when an item is expanded', fakeAsync(() => {
let fixture = TestBed.createComponent(RepeaterTestComponent);
Expand Down Expand Up @@ -106,24 +117,20 @@ describe('Repeater item component', () => {
let el = fixture.nativeElement;

cmp.expandMode = 'single';

fixture.detectChanges();

tick();

let repeaterItems = cmp.repeater.items.toArray();

expect(repeaterItems[0].isExpanded).toBe(true);
expect(el.querySelector('sky-chevron').getAttribute('aria-expanded')).toBe('true');

el.querySelectorAll('.sky-repeater-item-title').item(0).click();

fixture.detectChanges();

tick();

repeaterItems = cmp.repeater.items.toArray();

expect(repeaterItems[0].isExpanded).toBe(false);
expect(el.querySelector('sky-chevron').getAttribute('aria-expanded')).toBe('false');
}));

it('should toggle its collapsed state when an item\'s chevron is clicked', fakeAsync(() => {
Expand Down