Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 298fffa

Browse files
committed
style-guide(add-a11y): Add accessibility quick wins
1 parent 0664a27 commit 298fffa

File tree

12 files changed

+346
-1
lines changed

12 files changed

+346
-1
lines changed

public/docs/_examples/style-guide/e2e-spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,5 @@ describe('Style Guide', function () {
206206
let button = element(by.tagName('sg-app > toh-hero-button > button'));
207207
expect(button.getText()).toBe('OK');
208208
});
209+
209210
});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'sg-app',
5+
template: `<div>I am a page set to US English</div>`
6+
})
7+
export class AppComponent {
8+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!-- avoid -->
2+
3+
<!DOCTYPE html>
4+
<!-- #docregion page-lang-->
5+
<html>
6+
<!-- #enddocregion page-lang-->
7+
<head>
8+
<meta charset="UTF-8">
9+
<title>Title</title>
10+
</head>
11+
<body>
12+
<!--Some content-->
13+
</body>
14+
</html>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<!-- #docregion page-lang-->
3+
<html lang="en-US">
4+
<!-- #enddocregion page-lang -->
5+
<head>
6+
<meta charset="UTF-8">
7+
<title>Title</title>
8+
</head>
9+
<body>
10+
<!--Some content-->
11+
</body>
12+
</html>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './app.component';
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* #docregion */
2+
/* avoid */
3+
4+
:focus {
5+
outline: 0;
6+
}
7+
8+
/* or */
9+
10+
:focus {
11+
outline: none;
12+
}
13+
/* #enddocregion */
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<label>Name:
2+
<input [(ngModel)]="name">
3+
</label>
4+
<label>Surname:
5+
<input [(ngModel)]="surname">
6+
</label>
7+
{{name}}{{surname}}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
moduleId: module.id,
5+
selector: 'sg-app',
6+
templateUrl: 'app.component.html'
7+
})
8+
export class AppComponent {
9+
name: string;
10+
surname: string;
11+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './app.component';

public/docs/_examples/style-guide/ts/app/app.routes.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ import { AppComponent as S0701 } from '../07-01/app';
2626
import { AppComponent as S0703 } from '../07-03/app';
2727
import { AppComponent as S0704 } from '../07-04/app';
2828
import { AppComponent as S0901 } from '../09-01/app';
29+
import { AppComponent as S1001 } from '../10-01/app';
30+
import { AppComponent as S1002 } from '../10-02/app';
2931

3032
const routes: RouterConfig = [
3133
{ path: '01-01', component: S0101 },
@@ -54,6 +56,8 @@ const routes: RouterConfig = [
5456
{ path: '07-03', component: S0703 },
5557
{ path: '07-04', component: S0704 },
5658
{ path: '09-01', component: S0901 },
59+
{ path: '10-01', component: S1001 },
60+
{ path: '10-02', component: S1002 },
5761
];
5862

5963
export const APP_ROUTER_PROVIDERS = [

0 commit comments

Comments
 (0)