Skip to content

Commit b41b47c

Browse files
authored
Merge pull request MicrosoftDocs#314 from tahoon-ms/controls-a11y-reference
Add accessibility guidelines for every control in PowerApps
2 parents 077fdb7 + 4f6bed5 commit b41b47c

36 files changed

+791
-92
lines changed

powerapps-docs/maker/canvas-apps/controls/control-add-picture.md

Lines changed: 58 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -24,86 +24,97 @@ Takes a photo or loads images from the local device.
2424
## Description
2525
With this control users can take photos or upload image files from their device and update the data source with this content. On a mobile device the user is presented with the device's choice dialog to choose between taking a photo or selecting one already available.
2626

27-
This control is a composite control, made up of two controls. Press or tap once to select the outer control that shows the image that has been loaded. Press or tap again to select the inner label control.
27+
This control is a grouped control containing two controls: an **Image** and an **Add media button**. The **Image** control shows the uploaded image or a placeholder if no image has been uploaded. The **Add media button** prompts for an image to be uploaded.
2828

29-
## Outer control properties
30-
These properties apply to the outer control.
29+
See the [Image control reference](control-image.md) for **Image** properties.
30+
31+
## Add media button properties
32+
**[AccessibleLabel](properties-accessibility.md)** – Label for screen readers. Should describe the purpose of adding a picture.
33+
34+
**[Align](properties-text.md)** – The ___location of text in relation to the horizontal center of its control.
3135

3236
**[BorderColor](properties-color-border.md)** – The color of a control's border.
3337

3438
**[BorderStyle](properties-color-border.md)** – Whether a control's border is **Solid**, **Dashed**, **Dotted**, or **None**.
3539

3640
**[BorderThickness](properties-color-border.md)** – The thickness of a control's border.
3741

38-
**[DisplayMode](properties-core.md)** – Whether the control allows user input (**Edit**), only displays data (**View**), or is disabled (**Disabled**).
42+
**ChangePictureText** – Text that appears on the button when an image has been uploaded.
43+
44+
**[Color](properties-color-border.md)** – The color of text in a control.
3945

4046
**[DisabledBorderColor](properties-color-border.md)** – The color of a control's border if the control's **[DisplayMode](properties-core.md)** property is set to **Disabled**.
4147

48+
**[DisabledColor](properties-color-border.md)** – The color of text in a control if its **[DisplayMode](properties-core.md)** property is set to **Disabled**.
49+
4250
**[DisabledFill](properties-color-border.md)** – The background color of a control if its **[DisplayMode](properties-core.md)** property is set to **Disabled**.
4351

52+
**[DisplayMode](properties-core.md)** – Whether the control allows user input (**Edit**), only displays data (**View**), or is disabled (**Disabled**).
53+
4454
**Error** - If there is a problem uploading an image, this property will contain an appropriate error string.
4555

4656
**[Fill](properties-color-border.md)** – The background color of a control.
4757

48-
**[Height](properties-size-___location.md)** – The distance between a control's top and bottom edges.
58+
**[FocusedBorderColor](properties-color-border.md)** – The color of a control's border when the control is focused.
4959

50-
**[HoverBorderColor](properties-color-border.md)** – The color of a control's border when the user keeps the mouse pointer on that control.
60+
**[FocusedBorderThickness](properties-color-border.md)** – The thickness of a control's border when the control is focused.
5161

52-
**[HoverFill](properties-color-border.md)** – The background color of a control when the user keeps the mouse pointer on it.
62+
**[Font](properties-text.md)** – The name of the family of fonts in which text appears.
5363

54-
**Media**An identifier for the clip that an audio or video control plays.
64+
**[FontWeight](properties-text.md)**The weight of the text in a control: **Bold**, **Semibold**, **Normal**, or **Lighter**.
5565

56-
**[OnSelect](properties-core.md)**How the app responds when the user taps or clicks a control.
66+
**[Height](properties-size-___location.md)**The distance between a control's top and bottom edges.
5767

58-
**[PressedBorderColor](properties-color-border.md)** – The color of a control's border when the user taps or clicks that control.
68+
**[HoverBorderColor](properties-color-border.md)** – The color of a control's border when the user keeps the mouse pointer on that control.
5969

60-
**[PressedFill](properties-color-border.md)** – The background color of a control when the user taps or clicks that control.
70+
**[HoverColor](properties-color-border.md)** – The color of the text in a control when the user keeps the mouse pointer on it.
6171

62-
**[Visible](properties-core.md)**Whether a control appears or is hidden.
72+
**[HoverFill](properties-color-border.md)**The background color of a control when the user keeps the mouse pointer on it.
6373

64-
**[Width](properties-size-___location.md)**The distance between a control's left and right edges.
74+
**[Italic](properties-text.md)**Whether the text in a control is italic.
6575

66-
**[X](properties-size-___location.md)**The distance between the left edge of a control and the left edge of its parent container (screen if no parent container).
76+
**Media**An identifier for the clip that an audio or video control plays.
6777

68-
**[Y](properties-size-___location.md)** – The distance between the top edge of a control and the top edge of the parent container (screen if no parent container).
78+
**[OnChange](properties-core.md)** – How the app responds when the user changes the value of a control (for example, by adjusting a slider).
79+
80+
**[OnSelect](properties-core.md)** – How the app responds when the user taps or clicks a control.
6981

70-
## Inner text properties
71-
These properties apply to the inner label control that by default says "Tap or click to add a picture". To select this inner control, press or tap the **Add picture** control once, and then again.
82+
**[Padding](properties-size-___location.md)** – The distance between the text on an import or export button and the edges of that button.
7283

73-
**[Align](properties-text.md)** – The ___location of text in relation to the horizontal center of its control.
84+
**[PressedBorderColor](properties-color-border.md)** – The color of a control's border when the user taps or clicks that control.
7485

75-
**[Color](properties-color-border.md)** – The color of text in a control.
86+
**[PressedColor](properties-color-border.md)** – The color of text in a control when the user taps or clicks that control.
7687

77-
**[DisabledColor](properties-color-border.md)** – The color of text in a control if its **[DisplayMode](properties-core.md)** property is set to **Disabled**.
88+
**[PressedFill](properties-color-border.md)** – The background color of a control when the user taps or clicks that control.
7889

79-
**[Font](properties-text.md)**The name of the family of fonts in which text appears.
90+
**[Reset](properties-core.md)**Whether a control reverts to its default value.
8091

81-
**[FontWeight](properties-text.md)** – The weight of the text in a control: **Bold**, **Semibold**, **Normal**, or **Lighter**.
92+
**[Size](properties-text.md)** – The font size of the text that appears on a control.
8293

83-
**[HoverColor](properties-color-border.md)**The color of the text in a control when the user keeps the mouse pointer on it.
94+
**[Strikethrough](properties-text.md)**Whether a line appears through the text that appears on a control.
8495

85-
**[Italic](properties-text.md)**Whether the text in a control is italic.
96+
**[TabIndex](properties-accessibility.md)**Keyboard navigation order in relation to other controls.
8697

87-
**[OnChange](properties-core.md)**How the app responds when the user changes the value of a control (for example, by adjusting a slider).
98+
**[Text](properties-core.md)**Text that appears on the button when an image has not been uploaded.
8899

89-
**[Padding](properties-size-___location.md)**The distance between the text on an import or export button and the edges of that button.
100+
**[Tooltip](properties-core.md)**Explanatory text that appears when the user hovers over a control.
90101

91-
**[PressedColor](properties-color-border.md)**The color of text in a control when the user taps or clicks that control.
102+
**[Underline](properties-text.md)**Whether a line appears under the text that appears on a control.
92103

93-
**[Size](properties-text.md)** – The font size of the text that appears on a control.
104+
**[VerticalAlign](properties-text.md)** – The ___location of text on a control in relation to the vertical center of that control.
94105

95-
**[Strikethrough](properties-text.md)** – Whether a line appears through the text that appears on a control.
106+
**[Visible](properties-core.md)** – Whether a control appears or is hidden.
96107

97-
**[Text](properties-core.md)**Text that appears on a control or that the user types into a control.
108+
**[Width](properties-size-___location.md)**The distance between a control's left and right edges.
98109

99-
**[Underline](properties-text.md)**Whether a line appears under the text that appears on a control.
110+
**[X](properties-size-___location.md)**The distance between the left edge of a control and the left edge of its parent container (screen if no parent container).
100111

101-
**[VerticalAlign](properties-text.md)** – The ___location of text on a control in relation to the vertical center of that control.
112+
**[Y](properties-size-___location.md)** – The distance between the top edge of a control and the top edge of the parent container (screen if no parent container).
102113

103114
## Related functions
104115
[**Patch**( *DataSource*, *BaseRecord*, *ChangeRecord* )](../functions/function-patch.md)
105116

106-
## Example
117+
## Examples
107118
### Add images to an Image gallery control
108119
1. Add an **Add picture** control, and then triple-click it.
109120

@@ -124,3 +135,17 @@ These properties apply to the inner label control that by default says "Tap or c
124135

125136
Use the **[SaveData](../functions/function-savedata-loaddata.md)** function to save the images locally or the **[Patch](../functions/function-patch.md)** function to update a data source.
126137

138+
139+
## Accessibility guidelines
140+
The same guidelines for **[Button](control-button.md)** and **[Image](control-image.md)** apply. In addition, consider the following:
141+
142+
### Color contrast
143+
* **Add media button** must have adequate contrast between its text and background. Since the uploaded image may have varying colors, use an opaque **[Fill](properties-color-border.md)** on the **Add media button** to ensure consistent contrast.
144+
145+
### Screen reader support
146+
* **Add media button** must have **Text** and **ChangePictureText** that prompts the user to add or change a picture.
147+
148+
### Keyboard support
149+
* **Add media button** must have **[TabIndex](properties-accessibility.md)** of zero or greater so that keyboard users can navigate to it.
150+
* **Add media button** must have clearly visible focus indicators. Use **[FocusedBorderColor](properties-color-border.md)** and **[FocusedBorderThickness](properties-color-border.md)** to achieve this.
151+

powerapps-docs/maker/canvas-apps/controls/control-attachments.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ An **Attachments** control lets you open files stored on a data source as well a
4848
**[OnSelect](properties-core.md)** – How the app responds when the user clicks on an attachment.
4949

5050
## Additional properties
51-
**AccessibleLabel**The label announced by screen readers.
51+
**[AccessibleLabel](properties-accessibility.md)**Label for screen readers. Should describe the purpose of the attachments.
5252

5353
**AddAttachmentText** – The label text for the link used to add a new attachment.
5454

@@ -60,12 +60,18 @@ An **Attachments** control lets you open files stored on a data source as well a
6060

6161
**[DisplayMode](properties-core.md)** – Whether the control allows adding and deleting files (**Edit**), only displays data (**View**), or is disabled (**Disabled**).
6262

63+
**[FocusedBorderColor](properties-color-border.md)** – The color of a control's border when the control is focused.
64+
65+
**[FocusedBorderThickness](properties-color-border.md)** – The thickness of a control's border when the control is focused.
66+
6367
**[Height](properties-size-___location.md)** – The distance between a control's top and bottom edges.
6468

6569
**MaxAttachmentsText** – The text that replaces the "Attach file" link when the control contains the maximum number of files allowed.
6670

6771
**NoAttachmentsText** – Informational text shown to the user when there are no files attached.
6872

73+
**[TabIndex](properties-accessibility.md)** – Keyboard navigation order in relation to other controls.
74+
6975
**[Visible](properties-core.md)** – Whether a control is visible or hidden.
7076

7177
**[Width](properties-size-___location.md)** – The distance between a control's left and right edges.
@@ -86,4 +92,31 @@ An **Attachments** control lets you open files stored on a data source as well a
8692

8793
The Attachments field associated with the SharePoint list will appear in the form.
8894

89-
Don't know how to [add and configure a control](../add-configure-controls.md)?
95+
[Learn how to add and configure a control.](../add-configure-controls.md)
96+
97+
98+
## Accessibility guidelines
99+
### Color contrast
100+
There must be adequate color contrast between:
101+
* **ItemColor** and **ItemFill**
102+
* **ItemHoverColor** and **ItemHoverFill**
103+
* **ItemPressedColor** and **ItemPressedFill**
104+
* **AddedItemColor** and **AddedItemFill**
105+
* **RemovedItemColor** and **RemovedItemFill**
106+
* **ItemErrorColor** and **ItemErrorFill**
107+
* **AddAttachmentColor** and **Fill**
108+
* **MaxAttachmentsColor** and **Fill**
109+
* **NoAttachmentsColor** and **Fill**
110+
111+
This is in addition to the standard color contrast requirements.
112+
113+
### Screen reader support
114+
The following properties must be present:
115+
* **[AccessibleLabel](properties-accessibility.md)**
116+
* **AddAttachmentsText**
117+
* **MaxAttachmentsText**
118+
* **NoAttachmentsText**
119+
120+
### Keyboard support
121+
* **[TabIndex](properties-accessibility.md)** must be zero or greater so that keyboard users can navigate to it.
122+
* Focus indicators must be clearly visible. Use **[FocusedBorderColor](properties-color-border.md)** and **[FocusedBorderThickness](properties-color-border.md)** to achieve this.

powerapps-docs/maker/canvas-apps/controls/control-audio-video.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ An **Audio** control plays a sound clip from a file, a recording from a **[Micro
3232
**ShowControls** – Whether an audio or video player shows, for example, a play button and a volume slider, and a pen control shows, for example, icons for drawing, erasing, and clearing.
3333

3434
## Additional properties
35+
**[AccessibleLabel](properties-accessibility.md)** – Label for screen readers. Should be the title of the video or audio clip.
36+
3537
**AutoPause** – Whether an audio or video clip automatically pauses if the user navigates to a different screen.
3638

3739
**AutoStart** – Whether an audio or video control automatically starts to play a clip when the user navigates to the screen that contains that control.
@@ -48,6 +50,10 @@ An **Audio** control plays a sound clip from a file, a recording from a **[Micro
4850

4951
**[Fill](properties-color-border.md)** – The background color of a control.
5052

53+
**[FocusedBorderColor](properties-color-border.md)** – The color of a control's border when the control is focused.
54+
55+
**[FocusedBorderThickness](properties-color-border.md)** – The thickness of a control's border when the control is focused.
56+
5157
**[Height](properties-size-___location.md)** – The distance between a control's top and bottom edges.
5258

5359
**[Image](properties-visual.md)** – The name of the image that appears in an image, audio, or microphone control.
@@ -70,6 +76,8 @@ An **Audio** control plays a sound clip from a file, a recording from a **[Micro
7076

7177
**Time** – A media control's current position.
7278

79+
**[TabIndex](properties-accessibility.md)** – Keyboard navigation order in relation to other controls.
80+
7381
**[Tooltip](properties-core.md)** – Explanatory text that appears when the user hovers over a control.
7482

7583
**[Visible](properties-core.md)** – Whether a control appears or is hidden.
@@ -100,3 +108,31 @@ An **Audio** control plays a sound clip from a file, a recording from a **[Micro
100108
1. Add a **Video** control, and set its **Media** property to the URL, enclosed in double quotation marks, of a YouTube video.
101109
2. Press F5, and then play the clip by clicking or tapping the play button of the **Video** control.
102110
3. Press Esc to return to the default workspace.
111+
112+
113+
## Accessibility guidelines
114+
### Audio and video alternatives
115+
* **ShowControls** must be true so that users can listen or watch multimedia at their own pace. This also allows users to toggle closed captions and full-screen mode on video players.
116+
* Closed captions must be provided for videos.
117+
* For YouTube videos, use authoring tools provided by YouTube to add captions.
118+
* For other videos, create captions in WebVTT format, upload them, and set **ClosedCaptionsUrl** to the url ___location. There are several limitations. Server(s) hosting video and captions needs to be CORS-enabled and serve them using HTTPS protocol. Captioning does not work on Internet Explorer.
119+
* Consider providing an audio or video transcript using one of these methods:
120+
1. Put the text in a **[Label](control-text-box.md)** and position it adjacent to the multimedia player. Optionally, create a **[Button](control-button.md)** to toggle the display of the text.
121+
2. Put the text in a different screen. Create a **[Button](control-button.md)** that navigates to the screen and position the button adjacent to the multimedia player.
122+
3. If the description is short, it can be put it in the **[AccessibleLabel](properties-accessibility.md)**.
123+
124+
### Color contrast
125+
There must be adequate color contrast between:
126+
* **[FocusedBorderColor](properties-color-border.md)** and the outside color
127+
* **[Image](properties-visual.md)** and the multimedia player controls (if applicable)
128+
* **[Fill](properties-color-border.md)** and the multimedia player controls (if the fill is visible)
129+
130+
Provide closed captions and/or transcript if the video content has color contrast issues.
131+
132+
### Screen reader support
133+
* **[AccessibleLabel](properties-accessibility.md)** must be present.
134+
135+
### Keyboard support
136+
* **[TabIndex](properties-accessibility.md)** must be zero or greater so that keyboard users can navigate to it.
137+
* Focus indicators must be clearly visible. Use **[FocusedBorderColor](properties-color-border.md)** and **[FocusedBorderThickness](properties-color-border.md)** to achieve this.
138+
* **AutoStart** should be false because it can be difficult for keyboard users to stop playback quickly.

0 commit comments

Comments
 (0)