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

Commit 51a166a

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

File tree

17 files changed

+387
-1
lines changed

17 files changed

+387
-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';
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<!-- #docregion -->
2+
<!--avoid-->
3+
<div class="button" (click)="saveData()">Press me</div>
4+
<!-- #enddocregion -->

0 commit comments

Comments
 (0)