This commit is contained in:
JaymeMPerlman 2017-05-09 22:57:06 -07:00
Родитель 6a8fde17f5
Коммит 28a1a6140a
3 изменённых файлов: 21 добавлений и 19 удалений

Просмотреть файл

@ -62,5 +62,5 @@ Actions add buttons to the card. They don't define the logic of the actions, bu
## Learn More
* The [Card Schema reference documentation](CardSchema.md) contains details of each element.
<!--* Visit the [Samples](/samples) to see interactive cards. -->
<!--* Visit the [Schema Explorer](/Explorer) to see interactive examples of each element and its properties-->
* Examine the interactive card [samples](/samples) to see interactive cards.
* The [Schema Explorer](../../../explorer/index.html) contains interactive examples of each element and its properties.

Просмотреть файл

@ -2,14 +2,15 @@
We live in an era of speech interaction via services like Cortana. Adaptive cards are designed from day one
to support speech, enabling cool new hands-full scenarios.
The `speak` tag enables the adaptive card to be delivered to an environment where a visual display might not be primary experience (such as to a car dashboard while driving).
The `speak` tag enables the adaptive card to be delivered to an environment where a visual display is not primary experience, such as to a car dashboard while driving.
## Speak Property
To support speech we have a *speak* property which contains text to say to the user. The text can be annotated using speech synthesis markup language
To support speech we have a *speak* property which contains text to say to the user. The text can be annotated using speech synthesis markup language
([SSML](https://msdn.microsoft.com/en-us/library/office/hh361578(v=office.14).aspx)). SSML controls the speed, tone, and inflection of the speech. It even allows you to stream audio or a render a TTS audio stream
from your own service, giving you a great deal of flexibility for customization.
There are 2 patterns for speak property usage by a host application:
There are two patterns for speak property usage by a host application:
* **On delivery** - When a card is delivered, the client may opt to read the Speak property for the card to describe the card as a whole.
* **On demand** - In order to support a richer accessibility model, the schema supports a speak tag for each element. The client may read a Speak property for each element in the card.
@ -24,5 +25,5 @@ There are 2 patterns for speak property usage by a host application:
```
## Speech content
Content designed for speech is usually different from content designed for visual display. When you design
a card, you are designing an entire visual experience to present information to a user in a way that delights them. When designing for speech, you should think about how to verbally describe the content to them in a way that delights the user.
Content designed for speech is different from content designed for visual display. When you design
a card, you are designing an entire visual experience to present information to a user in a way that delights them. When designing for speech, you should think about how to verbally describe the content in a way that delights the user.

Просмотреть файл

@ -6,7 +6,7 @@ To support inline markup, adaptive cards supports a subset of Markdown syntax.
Supported:
**Bold**
**Bold** </br>
*Italic*
* Bulleted Lists
1. Numbered Lists
@ -27,27 +27,28 @@ recipient's timezone. This is a much easier task for the client than for the se
These functions can be invoked anywhere in the text of a text block.
```javascript
"Your order was shipped {{DATE(2017-02-13T20:46:30Z, Long)}} and will arrive at {{TIME(2017-02-13T20:00:00Z, Short)}}"
"Your order was shipped {{DATE(2017-02-13T20:46:30Z, Long)}} and will arrive at {{TIME(2017-02-13T20:00:00Z, Short)}}"
```
### Date formatting function
The DATE function is passed an ISO-8601 formatted date-time record (example: 2017-02-13T20:46:30Z), and an optional hint expressing how to format the date in the text string.
The DATE function is passed an [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) formatted date-time record (example: 2017-02-13T20:46:30Z), and an optional hint expressing how to format the date in the text string.
The format is expressed as a binding clause like this:
```javascript
{{DATE(..iso-8601.., Short|Long)}}
{{DATE(..iso-8601.., Short|Long)}}
```
Example for (en-us):
```javascript
{{DATE(2017-02-13T20:46:30Z, Short)}} => 2/13/2017
{{DATE(2017-02-13T20:46:30Z, Long)}} => Monday, February 13, 2017
{{DATE(2017-02-13T20:46:30Z, Short)}} => 2/13/2017
{{DATE(2017-02-13T20:46:30Z, Long)}} => Monday, February 13, 2017
```
> NOTE: The hint part of the function is optional and can be omitted like this:
The Hint part of the function is optional and can be omitted.
```javascript
{{DATE(2017-02-13T20:46:30z)}}
{{DATE(2017-02-13T20:46:30z)}}
```
### Time formatting function
@ -57,15 +58,15 @@ The TIME function is passed an ISO-8601 formatted date-time record (example: 201
The format is expressed as a binding clause like this:
```javascript
{{TIME(..iso-8601.., Short|Long)}}
{{TIME(..iso-8601.., Short|Long)}}
```
Example for (en-us):
```javascript
{{TIME(2017-02-13T20:46:30Z, Short)}} => 8:46 PM
{{TIME(2017-02-13T20:46:30Z, Long)}} => 8:46:30 PM
{{TIME(2017-02-13T20:46:30Z, Short)}} => 8:46 PM
{{TIME(2017-02-13T20:46:30Z, Long)}} => 8:46:30 PM
```
The Hint part of the function is optional and can be omitted.
```javascript
{{TIME(2017-02-13T20:46:30z)}}
{{TIME(2017-02-13T20:46:30z)}}
```