From a503e19898df2eaa7cf190fd38dfee88bac38e35 Mon Sep 17 00:00:00 2001 From: tinayuangao Date: Tue, 1 Aug 2017 14:39:35 -0700 Subject: [PATCH] Add more demos in button accessibility demo page (#6099) --- src/demo-app/a11y/button/button-a11y.html | 79 +++++++++++++++-------- src/demo-app/a11y/button/button-a11y.scss | 12 ---- src/demo-app/a11y/button/button-a11y.ts | 6 +- 3 files changed, 56 insertions(+), 41 deletions(-) diff --git a/src/demo-app/a11y/button/button-a11y.html b/src/demo-app/a11y/button/button-a11y.html index 8167528a18c..875f983c217 100644 --- a/src/demo-app/a11y/button/button-a11y.html +++ b/src/demo-app/a11y/button/button-a11y.html @@ -1,29 +1,52 @@ -
-

Button elements

- - - - - -
+
+
+

Button elements

+

Click on the buttons to increase the button counter.

+

Current number of clicks: {{counter}}

+ + + + + +
-
-

Anchor elements

- Google search - Google search - - check - - - check - - - check - -
+
+

Anchor elements

+ Google search + YouTube + + search + + + search + + + search + +
+ +
+

Buttons in different colors

+ + + +
+ +
+

Disabled button

+

The following "cancel" button is disabled

+ +
+
diff --git a/src/demo-app/a11y/button/button-a11y.scss b/src/demo-app/a11y/button/button-a11y.scss index 2a39d15c12a..c418e5025e9 100644 --- a/src/demo-app/a11y/button/button-a11y.scss +++ b/src/demo-app/a11y/button/button-a11y.scss @@ -1,18 +1,6 @@ - .demo-button { button, a { margin: 8px; text-transform: uppercase; } - - section { - display: flex; - align-items: center; - margin: 8px; - } - - p { - padding: 5px 15px; - } } - diff --git a/src/demo-app/a11y/button/button-a11y.ts b/src/demo-app/a11y/button/button-a11y.ts index d2ff4d484d9..616e8252d54 100644 --- a/src/demo-app/a11y/button/button-a11y.ts +++ b/src/demo-app/a11y/button/button-a11y.ts @@ -8,5 +8,9 @@ import {Component} from '@angular/core'; styleUrls: ['button-a11y.css'], }) export class ButtonAccessibilityDemo { - // TODO(tinayuangao): Add use cases + counter: number = 0; + + increase() { + this.counter++; + } }