feat(aio): search results accessibility items
Add visually hidden class and apply to h2 in search results Changed h2 group headers to h3s Add roles to main and content Fix API material icon placement Image alt additions where needed Add lang attribute to html tag Add aria-label on search input
This commit is contained in:
parent
76269f4a1f
commit
4624406ce8
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Animations</title>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<div class="home-rows"><!-- Group 1-->
|
||||
<div layout="row" layout-xs="column" class="home-row">
|
||||
<div class="promo-img-container promo-1">
|
||||
<div><img src="assets/images/home/responsive-framework.svg"></div>
|
||||
<div><img src="assets/images/home/responsive-framework.svg" alt="responsive framework"></div>
|
||||
</div>
|
||||
<div class="text-container">
|
||||
<div class="text-block promo-1-desc l-pad-top-2"><h3 class="text-headline">Develop Across
|
||||
|
@ -38,12 +38,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="promo-img-container promo-2">
|
||||
<div><img src="assets/images/home/speed-performance.svg"></div>
|
||||
<div><img src="assets/images/home/speed-performance.svg" alt="speed and performance"></div>
|
||||
</div>
|
||||
</div><!-- Group 3-->
|
||||
<div layout="row" layout-xs="column" class="home-row">
|
||||
<div class="promo-img-container promo-3">
|
||||
<div><img src="assets/images/home/joyful-development.png"></div>
|
||||
<div><img src="assets/images/home/joyful-development.png" alt="IDE example"></div>
|
||||
</div>
|
||||
<div class="text-container">
|
||||
<div class="text-block promo-3-desc"><h3 class="text-headline">Incredible Tooling</h3>
|
||||
|
@ -63,7 +63,7 @@
|
|||
applications.</p></div>
|
||||
</div>
|
||||
<div class="promo-img-container promo-4">
|
||||
<div><img src="assets/images/home/loved-by-millions.png"></div>
|
||||
<div><img src="assets/images/home/loved-by-millions.png" alt="angular on the map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cta-bar"><a href="/guide/quickstart" md-button="md-button" class="button button-large button-shield mat-raised mat-primary">Get Started</a></div>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<div class="presskit-row">
|
||||
<div class="presskit-inner">
|
||||
<div class="presskit-image-container">
|
||||
<img src="assets/images/logos/angular/angular.svg">
|
||||
<img src="assets/images/logos/angular/angular.svg" alt="Angular">
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="l-space-left-3">FULL COLOR LOGO</h3>
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
<span class="fill-remaining-space"></span>
|
||||
</md-toolbar>
|
||||
|
||||
<md-sidenav-container class="sidenav-container">
|
||||
<md-sidenav-container class="sidenav-container" role="main">
|
||||
|
||||
<md-sidenav [ngClass]="{'collapsed': !isSideBySide }" #sidenav class="sidenav" [opened]="isOpened" [mode]="mode">
|
||||
<aio-nav-menu *ngIf="!isSideBySide" class="top-menu" [nodes]="topMenuNodes" [currentNode]="currentNode"></aio-nav-menu>
|
||||
<aio-nav-menu [nodes]="sideNavNodes" [currentNode]="currentNode" ></aio-nav-menu>
|
||||
</md-sidenav>
|
||||
|
||||
<section class="sidenav-content" [id]="pageId">
|
||||
<section class="sidenav-content" [id]="pageId" role="content">
|
||||
<aio-doc-viewer [doc]="currentDocument" (docRendered)="onDocRendered()"></aio-doc-viewer>
|
||||
<aio-dt [on]="dtOn" [(doc)]="currentDocument"></aio-dt>
|
||||
</section>
|
||||
|
|
|
@ -17,6 +17,7 @@ import { LocationService } from 'app/shared/location.service';
|
|||
@Component({
|
||||
selector: 'aio-search-box',
|
||||
template: `<input #searchBox
|
||||
aria-label="search"
|
||||
placeholder="Search"
|
||||
(keyup)="onSearch($event.target.value, $event.which)"
|
||||
(focus)="onSearch($event.target.value)"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<div class="search-results" *ngIf="(searchAreas | async)?.length > 0" >
|
||||
<h2 class="visually-hidden">Search Results</h2>
|
||||
<div class="search-area" *ngFor="let area of searchAreas | async">
|
||||
<h2>{{area.name}}</h2>
|
||||
<h3>{{area.name}}</h3>
|
||||
<div class="search-page" *ngFor="let page of area.pages">
|
||||
<a class="search-result-item" href="{{ page.path }}" (click)="onResultSelected(page)">{{ page.title }}</a>
|
||||
</div>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<noscript>
|
||||
<header>
|
||||
<div class="hero">
|
||||
<img src="assets/images/logos/angular/angular.svg" />
|
||||
<img src="assets/images/logos/angular/angular.svg" alt="Angular"/>
|
||||
<h1>One framework.<br>Mobile & desktop.</h1>
|
||||
<br />
|
||||
<h3 style="color:red">
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
aio-menu {
|
||||
display: none;
|
||||
}
|
||||
.sidenav-content {
|
||||
min-height: 450px;
|
||||
}
|
||||
}
|
||||
|
||||
.sidenav-container {
|
||||
|
|
|
@ -34,4 +34,10 @@ l-relative {
|
|||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.visually-hidden {
|
||||
position: absolute !important;
|
||||
top: -9999px !important;
|
||||
left: -9999px !important;
|
||||
}
|
|
@ -34,8 +34,9 @@ aio-search-results {
|
|||
flex-direction: column;
|
||||
margin: 16px 16px;
|
||||
height: 100%;
|
||||
h2 {
|
||||
h3 {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
margin: 10px 0px 5px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/* API EDIT ICON */
|
||||
#api {
|
||||
.info-bar .material-icons {
|
||||
top: 24px;
|
||||
right: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
/* API LIST STYLES */
|
||||
|
||||
aio-api-list {
|
||||
|
|
Loading…
Reference in New Issue