Make notebook cells selectable for tab navigation. (#8946)

This commit is contained in:
Cory Rivera
2020-01-23 15:39:27 -08:00
committed by GitHub
parent 5ccc0fd97b
commit 2eebcab74a
4 changed files with 22 additions and 2 deletions

View File

@@ -21,7 +21,12 @@
</button>
</div>
<div *ngFor="let cell of cells">
<div class="notebook-cell" (click)="selectCell(cell, $event)" [class.active]="cell.active">
<div class="notebook-cell"
(click)="selectCell(cell, $event)"
(focus)="selectCell(cell, $event)"
[class.active]="cell.active"
[attr.aria-label]="cell.ariaLabel"
tabindex="0">
<code-cell-component *ngIf="cell.cellType === 'code'" [cellModel]="cell" [model]="model" [activeCellId]="activeCellId">
</code-cell-component>
<text-cell-component *ngIf="cell.cellType === 'markdown'" [cellModel]="cell" [model]="model" [activeCellId]="activeCellId">