Skip to content

Commit

Permalink
feat(accordion): add key navigation to accordion (#4192)
Browse files Browse the repository at this point in the history
- Changed accordion component template, changed `div` to `button`
- Changed accordion demo `Custom html`, changed `div` to `button`
- Changed visual presentation of accordion headings because of tag `button`
  • Loading branch information
EvilAlexei authored and valorkin committed May 17, 2018
1 parent b4c0bcb commit 69b35b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<accordion>
<accordion-group>
<div accordion-heading class="clearfix">
I can have markup!
<button class="btn btn-link btn-block clearfix" accordion-heading>
<div class="pull-left float-left">I can have markup!</div>
<span class="badge badge-secondary float-right pull-right">Some HTML here</span>
</div>
</button>
This is just some content to illustrate fancy headings.
</accordion-group>
<accordion-group>
<div accordion-heading>
<button class="btn btn-link" accordion-heading>
I can have markup, too!
</div>
</button>
<span class="badge badge-secondary center">And some HTML here</span>
</accordion-group>
</accordion>
4 changes: 2 additions & 2 deletions src/accordion/accordion-group.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<div class="panel-title">
<div role="button" class="accordion-toggle"
[attr.aria-expanded]="isOpen">
<div *ngIf="heading" [ngClass]="{'text-muted': isDisabled}">
<button class="btn btn-link" *ngIf="heading" [ngClass]="{'text-muted': isDisabled}">
{{ heading }}
</div>
</button>
<ng-content select="[accordion-heading]"></ng-content>
</div>
</div>
Expand Down

0 comments on commit 69b35b3

Please sign in to comment.