Merge pull request #1701 from hunicus/lighthouse-parents-2

Add role attributes for doc nav elements
This commit is contained in:
wiz 2022-05-25 20:30:45 +09:00 committed by GitHub
commit 2a486a1762
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 14 deletions

View File

@ -1,14 +1,14 @@
<div class="code"> <div class="code">
<ul ngbNav #navCodeTemplate="ngbNav" class="nav-tabs code-tab"> <ul ngbNav #navCodeTemplate="ngbNav" class="nav-tabs code-tab" role="tablist">
<li ngbNavItem *ngIf="code.codeTemplate.curl && method !== 'websocket'"> <li ngbNavItem *ngIf="code.codeTemplate.curl && method !== 'websocket'" role="presentation">
<a ngbNavLink (click)="adjustContainerHeight( $event )">cURL</a> <a ngbNavLink (click)="adjustContainerHeight( $event )" role="tab">cURL</a>
<ng-template ngbNavContent> <ng-template ngbNavContent>
<div class="subtitle"><ng-container i18n="API Docs code example">Code Example</ng-container> <app-clipboard [text]="wrapCurlTemplate(code)"></app-clipboard></div> <div class="subtitle"><ng-container i18n="API Docs code example">Code Example</ng-container> <app-clipboard [text]="wrapCurlTemplate(code)"></app-clipboard></div>
<pre><code [innerText]="wrapCurlTemplate(code)"></code></pre> <pre><code [innerText]="wrapCurlTemplate(code)"></code></pre>
</ng-template> </ng-template>
</li> </li>
<li ngbNavItem *ngIf="showCodeExample[network]"> <li ngbNavItem *ngIf="showCodeExample[network]" role="presentation">
<a ngbNavLink (click)="adjustContainerHeight( $event )" >CommonJS</a> <a ngbNavLink (click)="adjustContainerHeight( $event )" role="tab">CommonJS</a>
<ng-template ngbNavContent> <ng-template ngbNavContent>
<div class="subtitle"><ng-container i18n="API Docs code example">Code Example</ng-container> <app-clipboard [text]="wrapCommonJS(code)"></app-clipboard></div> <div class="subtitle"><ng-container i18n="API Docs code example">Code Example</ng-container> <app-clipboard [text]="wrapCommonJS(code)"></app-clipboard></div>
<div class="links"> <div class="links">
@ -17,8 +17,8 @@
<pre><code [innerText]="wrapCommonJS(code)"></code></pre> <pre><code [innerText]="wrapCommonJS(code)"></code></pre>
</ng-template> </ng-template>
</li> </li>
<li ngbNavItem *ngIf="showCodeExample[network]"> <li ngbNavItem *ngIf="showCodeExample[network]" role="presentation">
<a ngbNavLink (click)="adjustContainerHeight( $event )">ES Module</a> <a ngbNavLink (click)="adjustContainerHeight( $event )" role="tab">ES Module</a>
<ng-template ngbNavContent> <ng-template ngbNavContent>
<div class="subtitle"><ng-container i18n="API Docs install lib">Install Package</ng-container> <app-clipboard [text]="wrapImportTemplate()"></app-clipboard></div> <div class="subtitle"><ng-container i18n="API Docs install lib">Install Package</ng-container> <app-clipboard [text]="wrapImportTemplate()"></app-clipboard></div>
<div class="links"> <div class="links">

View File

@ -3,10 +3,10 @@
<h2 i18n="documentation.title">Documentation</h2> <h2 i18n="documentation.title">Documentation</h2>
<ul ngbNav #nav="ngbNav" [(activeId)]="activeTab" class="nav-tabs"> <ul ngbNav #nav="ngbNav" [(activeId)]="activeTab" class="nav-tabs" role="tablist">
<li [ngbNavItem]="0" *ngIf="showFaqTab"> <li [ngbNavItem]="0" *ngIf="showFaqTab" role="presentation">
<a ngbNavLink [routerLink]="['/docs/faq' | relativeUrl]">FAQ</a> <a ngbNavLink [routerLink]="['/docs/faq' | relativeUrl]" role="tab">FAQ</a>
<ng-template ngbNavContent> <ng-template ngbNavContent>
<app-api-docs [whichTab]="'faq'"></app-api-docs> <app-api-docs [whichTab]="'faq'"></app-api-docs>
@ -14,8 +14,8 @@
</ng-template> </ng-template>
</li> </li>
<li [ngbNavItem]="1"> <li [ngbNavItem]="1" role="presentation">
<a ngbNavLink [routerLink]="['/docs/api/rest' | relativeUrl]">API - REST</a> <a ngbNavLink [routerLink]="['/docs/api/rest' | relativeUrl]" role="tab">API - REST</a>
<ng-template ngbNavContent> <ng-template ngbNavContent>
<app-api-docs [whichTab]="'rest'"></app-api-docs> <app-api-docs [whichTab]="'rest'"></app-api-docs>
@ -23,8 +23,8 @@
</ng-template> </ng-template>
</li> </li>
<li [ngbNavItem]="2" *ngIf="showWebSocketTab"> <li [ngbNavItem]="2" *ngIf="showWebSocketTab" role="presentation">
<a ngbNavLink [routerLink]="['/docs/api/websocket' | relativeUrl]">API - WebSocket</a> <a ngbNavLink [routerLink]="['/docs/api/websocket' | relativeUrl]" role="tab">API - WebSocket</a>
<ng-template ngbNavContent> <ng-template ngbNavContent>
<app-api-docs [whichTab]="'websocket'"></app-api-docs> <app-api-docs [whichTab]="'websocket'"></app-api-docs>