Skip to content

Commit b5e39aa

Browse files
authored
making spans compatible with header anchor icons (MicrosoftDocs#3255)
1 parent f026158 commit b5e39aa

File tree

73 files changed

+425
-425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+425
-425
lines changed

hub/apps/design/accessibility/accessibility-in-the-store.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ You should declare your app as accessible if you built and tested it for accessi
3939

4040
See the [Accessibility checklist](accessibility-checklist.md) for a review of these procedures and links to resources that will help you accomplish them.
4141

42-
<span id="related_topics"/>
42+
<span id="related_topics"></span>
4343

4444
## Related topics
4545
* [Accessibility](accessibility.md)

hub/apps/design/accessibility/accessibility-overview.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ This article is an overview of the concepts and technologies related to accessib
1515

1616

1717

18-
<span id="Accessibility_and_your_app"/>
19-
<span id="accessibility_and_your_app"/>
20-
<span id="ACCESSIBILITY_AND_YOUR_APP"/>
18+
<span id="Accessibility_and_your_app"></span>
19+
<span id="accessibility_and_your_app"></span>
20+
<span id="ACCESSIBILITY_AND_YOUR_APP"></span>
2121

2222
## Accessibility and your app
2323

@@ -31,17 +31,17 @@ Controls for XAML provide built-in keyboard support and support for assistive te
3131

3232
In addition, data binding, style, and template features make it easy to implement support for dynamic changes to display settings and text for alternative UIs.
3333

34-
<span id="UI_Automation"/>
35-
<span id="ui_automation"/>
36-
<span id="UI_AUTOMATION"/>
34+
<span id="UI_Automation"></span>
35+
<span id="ui_automation"></span>
36+
<span id="UI_AUTOMATION"></span>
3737

3838
## UI Automation
3939

4040
Accessibility support comes primarily from the integrated support for the Microsoft UI Automation framework. That support is provided through base classes and the built-in behavior of the class implementation for control types, and an interface representation of the UI Automation provider API. Each control class uses the UI Automation concepts of automation peers and automation patterns that report the control's role and content to UI Automation clients. The app is treated as a top-level window by UI Automation, and through the UI Automation framework all the accessibility-relevant content within that app window is available to a UI Automation client. For more info about UI Automation, see [UI Automation Overview](/windows/desktop/WinAuto/uiauto-uiautomationoverview).
4141

42-
<span id="Assistive_technology"/>
43-
<span id="assistive_technology"/>
44-
<span id="ASSISTIVE_TECHNOLOGY"/>
42+
<span id="Assistive_technology"></span>
43+
<span id="assistive_technology"></span>
44+
<span id="ASSISTIVE_TECHNOLOGY"></span>
4545

4646
## Assistive technology
4747

@@ -59,9 +59,9 @@ Apps that have good keyboard and screen reader support usually work well with va
5959

6060
Some of the options that you can use for testing basic accessibility scenarios with assistive technologies are listed in [Accessibility testing](accessibility-testing.md).
6161

62-
<span id="Screen_reader_support_and_basic_accessibility_information"/>
63-
<span id="screen_reader_support_and_basic_accessibility_information"/>
64-
<span id="SCREEN_READER_SUPPORT_AND_BASIC_ACCESSIBILITY_INFORMATION"/>
62+
<span id="Screen_reader_support_and_basic_accessibility_information"></span>
63+
<span id="screen_reader_support_and_basic_accessibility_information"></span>
64+
<span id="SCREEN_READER_SUPPORT_AND_BASIC_ACCESSIBILITY_INFORMATION"></span>
6565

6666
## Screen reader support and basic accessibility information
6767

@@ -73,27 +73,27 @@ The most important information that a screen reader or any other assistive techn
7373

7474
There are several other automation properties available (including the keyboard properties described in the next section). However, not all screen readers support all automation properties. In general, you should set all appropriate automation properties and test to provide the widest possible support for screen readers.
7575

76-
<span id="Keyboard_support"/>
77-
<span id="keyboard_support"/>
78-
<span id="KEYBOARD_SUPPORT"/>
76+
<span id="Keyboard_support"></span>
77+
<span id="keyboard_support"></span>
78+
<span id="KEYBOARD_SUPPORT"></span>
7979

8080
## Keyboard support
8181

8282
To provide good keyboard support, you must ensure that every part of your application can be used with a keyboard. If your app uses mostly the standard controls and doesn't use any custom controls, you are most of the way there already. The basic XAML control model provides built-in keyboard support including tab navigation, text input, and control-specific support. The elements that serve as layout containers (such as panels) use the layout order to establish a default tab order. That order is often the correct tab order to use for an accessible representation of the UI. If you use [**ListBox**](/uwp/api/Windows.UI.Xaml.Controls.ListBox) and [**GridView**](/uwp/api/Windows.UI.Xaml.Controls.GridView) controls to display data, they provide built-in arrow-key navigation. Or if you use a [**Button**](/uwp/api/Windows.UI.Xaml.Controls.Button) control, it already handles the Spacebar or Enter keys for button activation.
8383

8484
For more info about all the aspects of keyboard support, including tab order and key-based activation or navigation, see [Keyboard accessibility](keyboard-accessibility.md).
8585

86-
<span id="Media_and_captioning"/>
87-
<span id="media_and_captioning"/>
88-
<span id="MEDIA_AND_CAPTIONING"/>
86+
<span id="Media_and_captioning"></span>
87+
<span id="media_and_captioning"></span>
88+
<span id="MEDIA_AND_CAPTIONING"></span>
8989

9090
## Media and captioning
9191

9292
You typically display audiovisual media through a [**MediaElement**](/uwp/api/Windows.UI.Xaml.Controls.MediaElement) object. You can use **MediaElement** APIs to control the media playback. For accessibility purposes, provide controls that enable users to play, pause, and stop the media as needed. Sometimes, media includes additional components that are intended for accessibility, such as captioning or alternative audio tracks that include narrative descriptions.
9393

94-
<span id="Accessible_text"/>
95-
<span id="accessible_text"/>
96-
<span id="ACCESSIBLE_TEXT"/>
94+
<span id="Accessible_text"></span>
95+
<span id="accessible_text"></span>
96+
<span id="ACCESSIBLE_TEXT"></span>
9797

9898
## Accessible text
9999

@@ -103,17 +103,17 @@ Three main aspects of text are relevant to accessibility:
103103
* Many users have sight limitations that make it difficult for them to read text unless it has adequate contrast against the background. How this impacts the user is not intuitive for app designers who do not have that sight limitation. For example, for color-blind users, poor color choices in the design can prevent some users from being able to read the text. Accessibility recommendations that were originally made for web content define standards for contrast that can avoid these problems in apps as well. For more info, see [Accessible text requirements](accessible-text-requirements.md).
104104
* Many users have difficulty reading text that is simply too small. You can prevent this issue by making the text in your app's UI reasonably large in the first place. However, that's challenging for apps that display large quantities of text, or text interspersed with other visual elements. In such cases, make sure that the app correctly interacts with the system features that can scale up the display, so that any text in apps scales up along with it. (Some users change dpi values as an accessibility option. That option is available from **Make things on the screen larger** in **Ease of Access**, which redirects to a **Control Panel** UI for **Appearance and Personalization** / **Display**.)
105105

106-
<span id="Supporting_high-contrast_themes"/>
107-
<span id="supporting_high-contrast_themes"/>
108-
<span id="SUPPORTING_HIGH-CONTRAST_THEMES"/>
106+
<span id="Supporting_high-contrast_themes"></span>
107+
<span id="supporting_high-contrast_themes"></span>
108+
<span id="SUPPORTING_HIGH-CONTRAST_THEMES"></span>
109109

110110
## Supporting high-contrast themes
111111

112112
UI controls use a visual representation that is defined as part of a XAML resource dictionary of themes. One or more of these themes is specifically used when the system is set for high contrast. When the user switches to high contrast, by looking up the appropriate theme from a resource dictionary dynamically, all your UI controls will use an appropriate high-contrast theme too. Just make sure that you haven't disabled the themes by specifying an explicit style or using another styling technique that prevents the high-contrast themes from loading and overriding your style changes. For more info, see [High-contrast themes](high-contrast-themes.md).
113113

114-
<span id="Design_for_alternative_UI"/>
115-
<span id="design_for_alternative_ui"/>
116-
<span id="DESIGN_FOR_ALTERNATIVE_UI"/>
114+
<span id="Design_for_alternative_UI"></span>
115+
<span id="design_for_alternative_ui"></span>
116+
<span id="DESIGN_FOR_ALTERNATIVE_UI"></span>
117117

118118
## Design for alternative UI
119119

@@ -169,9 +169,9 @@ private void ShowAccessibleUICheckBox_Click(object sender, RoutedEventArgs e)
169169
}
170170
```
171171

172-
<span id="Verification_and_publishing"/>
173-
<span id="verification_and_publishing"/>
174-
<span id="VERIFICATION_AND_PUBLISHING"/>
172+
<span id="Verification_and_publishing"></span>
173+
<span id="verification_and_publishing"></span>
174+
<span id="VERIFICATION_AND_PUBLISHING"></span>
175175

176176
## Verification and publishing
177177

@@ -180,17 +180,17 @@ For more info about accessibility declarations and publishing your app, see [Acc
180180
> [!NOTE]
181181
> Declaring the app as accessible is only relevant to the Microsoft Store.
182182
183-
<span id="Assistive_technology_support_in_custom_controls"/>
184-
<span id="assistive_technology_support_in_custom_controls"/>
185-
<span id="ASSISTIVE_TECHNOLOGY_SUPPORT_IN_CUSTOM_CONTROLS"/>
183+
<span id="Assistive_technology_support_in_custom_controls"></span>
184+
<span id="assistive_technology_support_in_custom_controls"></span>
185+
<span id="ASSISTIVE_TECHNOLOGY_SUPPORT_IN_CUSTOM_CONTROLS"></span>
186186

187187
## Assistive technology support in custom controls
188188

189189
When you create a custom control, we recommend that you also implement or extend one or more [**AutomationPeer**](/uwp/api/Windows.UI.Xaml.Automation.Peers.AutomationPeer) subclasses to provide accessibility support. In some cases, so long as you use the same peer class as was used by the base control class, the automation support for your derived class is adequate at a basic level. However, you should test this, and implementing a peer is still recommended as a best practice so that the peer can correctly report the class name of your new control class. Implementing a custom automation peer has a few steps involved. For more info, see [Custom automation peers](custom-automation-peers.md).
190190

191-
<span id="Assistive_technology_support_in_apps_that_support_XAML___Microsoft_DirectX_interop"/>
192-
<span id="assistive_technology_support_in_apps_that_support_xaml___microsoft_directx_interop"/>
193-
<span id="ASSISTIVE_TECHNOLOGY_SUPPORT_IN_APPS_THAT_SUPPORT_XAML___MICROSOFT_DIRECTX_INTEROP"/>
191+
<span id="Assistive_technology_support_in_apps_that_support_XAML___Microsoft_DirectX_interop"></span>
192+
<span id="assistive_technology_support_in_apps_that_support_xaml___microsoft_directx_interop"></span>
193+
<span id="ASSISTIVE_TECHNOLOGY_SUPPORT_IN_APPS_THAT_SUPPORT_XAML___MICROSOFT_DIRECTX_INTEROP"></span>
194194

195195
## Assistive technology support in apps that support XAML / Microsoft DirectX interop
196196

hub/apps/design/accessibility/accessible-text-requirements.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ ms.localizationpriority: medium
1616

1717
This topic describes best practices for accessibility of text in an app, by assuring that colors and backgrounds satisfy the necessary contrast ratio. This topic also discusses the Microsoft UI Automation roles that text elements in a Universal Windows Platform (UWP) app can have, and best practices for text in graphics.
1818

19-
<span id="contrast_rations"/>
20-
<span id="CONTRAST_RATIONS"/>
19+
<span id="contrast_rations"></span>
20+
<span id="CONTRAST_RATIONS"></span>
2121

2222
## Contrast ratios
2323
Although users always have the option to switch to a high-contrast mode, your app design for text should regard that option as a last resort. A much better practice is to make sure that your app text meets certain established guidelines for the level of contrast between text and its background. Evaluation of the level of contrast is based on deterministic techniques that do not consider color hue. For example, if you have red text on a green background, that text might not be readable to someone with a color blindness impairment. Checking and correcting the contrast ratio can prevent these types of accessibility issues.
@@ -33,9 +33,9 @@ Use color contrast tools to verify that the visible text contrast ratio is accep
3333
> [!NOTE]
3434
> Some of the tools listed by Techniques for WCAG 2.0 G18 can't be used interactively with a UWP app. You may need to enter foreground and background color values manually in the tool, or make screen captures of app UI and then run the contrast ratio tool over the screen capture image.
3535
36-
<span id="Text_element_roles"/>
37-
<span id="text_element_roles"/>
38-
<span id="TEXT_ELEMENT_ROLES"/>
36+
<span id="Text_element_roles"></span>
37+
<span id="text_element_roles"></span>
38+
<span id="TEXT_ELEMENT_ROLES"></span>
3939

4040
## Text element roles
4141
A UWP app can use these default elements (commonly called *text elements* or *textedit controls*):
@@ -49,9 +49,9 @@ When a control reports that is has a role of [**Edit**](/uwp/api/Windows.UI.Xaml
4949

5050
In the text models for XAML, there are two elements that are primarily used for static text, [**TextBlock**](/uwp/api/Windows.UI.Xaml.Controls.TextBlock) and [**RichTextBlock**](/uwp/api/Windows.UI.Xaml.Controls.RichTextBlock). Neither of these are a [**Control**](/uwp/api/Windows.UI.Xaml.Controls.Control) subclass, and as such neither of them are keyboard-focusable or can appear in the tab order. But that does not mean that assistive technologies can't or won't read them. Screen readers are typically designed to support multiple modes of reading the content in an app, including a dedicated reading mode or navigation patterns that go beyond focus and the tab order, like a "virtual cursor". So don't put your static text into focusable containers just so that tab order gets the user there. Assistive technology users expect that anything in the tab order is interactive, and if they encounter static text there, that is more confusing than helpful. You should test this out yourself with Narrator to get a sense of the user experience with your app when using a screen reader to examine your app's static text.
5151

52-
<span id="Auto-suggest_accessibility"/>
53-
<span id="auto-suggest_accessibility"/>
54-
<span id="AUTO-SUGGEST_ACCESSIBILITY"/>
52+
<span id="Auto-suggest_accessibility"></span>
53+
<span id="auto-suggest_accessibility"></span>
54+
<span id="AUTO-SUGGEST_ACCESSIBILITY"></span>
5555

5656
## Auto-suggest accessibility
5757
When a user types into an entry field and a list of potential suggestions appears, this type of scenario is called auto-suggest. This is common in the **To:** line of a mail field, the Cortana search box in Windows, the URL entry field in Microsoft Edge, the location entry field in the Weather app, and so on. If you are using a XAML [**AutosuggestBox**](/uwp/api/windows.ui.xaml.controls.autosuggestbox) or the HTML intrinsic controls, then this experience is already hooked up for you by default. To make this experience accessible the entry field and the list must be associated. This is explained in the [Implementing auto-suggest](#implementing_auto-suggest) section.
@@ -67,9 +67,9 @@ Narrator has been updated to make this type of experience accessible with a spec
6767
![Suggestion list](images/autosuggest-list.png)<br/>
6868
_Example of a suggestion list_
6969

70-
<span id="Implementing_auto-suggest"/>
71-
<span id="implementing_auto-suggest"/>
72-
<span id="IMPLEMENTING_AUTO-SUGGEST"/>
70+
<span id="Implementing_auto-suggest"></span>
71+
<span id="implementing_auto-suggest"></span>
72+
<span id="IMPLEMENTING_AUTO-SUGGEST"></span>
7373

7474
### Implementing auto-suggest
7575
To make this experience accessible the entry field and the list must be associated in the UIA tree. This association is done with the [UIA_ControllerForPropertyId](/windows/win32/winauto/uiauto-automation-element-propids) property in desktop apps or the [ControlledPeers](/uwp/api/windows.ui.xaml.automation.automationproperties.getcontrolledpeers) property in UWP apps.
@@ -104,17 +104,17 @@ If you are using the intrinsic controls in HTML, then the UIA implementation has
104104

105105
If you are creating your own controls, you must set up your own ARIA controls, which are explained in the W3C standards.
106106

107-
<span id="Text_in_graphics"/>
108-
<span id="text_in_graphics"/>
109-
<span id="TEXT_IN_GRAPHICS"/>
107+
<span id="Text_in_graphics"></span>
108+
<span id="text_in_graphics"></span>
109+
<span id="TEXT_IN_GRAPHICS"></span>
110110

111111
## Text in graphics
112112

113113
Whenever possible, avoid including text in a graphic. For example, any text that you include in the image source file that is displayed in the app as an [**Image**](/uwp/api/Windows.UI.Xaml.Controls.Image) element is not automatically accessible or readable by assistive technologies. If you must use text in graphics, make sure that the [**AutomationProperties.Name**](/dotnet/api/system.windows.automation.automationproperties.name) value that you provide as the equivalent of "alt text" includes that text or a summary of the text's meaning. Similar considerations apply if you are creating text characters from vectors as part of a [**Path**](/uwp/api/Windows.UI.Xaml.Shapes.Path), or by using [**Glyphs**](/uwp/api/Windows.UI.Xaml.Documents.Glyphs).
114114

115-
<span id="Text_font_size"/>
116-
<span id="text_font_size"/>
117-
<span id="TEXT_FONT_SIZE"/>
115+
<span id="Text_font_size"></span>
116+
<span id="text_font_size"></span>
117+
<span id="TEXT_FONT_SIZE"></span>
118118

119119
## Text font size and scale
120120

@@ -173,7 +173,7 @@ These types have an **IsTextScaleFactorEnabled** property:
173173
* [**TextBlock**](/uwp/api/Windows.UI.Xaml.Controls.TextBlock)
174174
* [**TextElement**](/uwp/api/Windows.UI.Xaml.Documents.TextElement) and derived classes
175175

176-
<span id="related_topics"/>
176+
<span id="related_topics"></span>
177177

178178
## Related topics
179179

0 commit comments

Comments
 (0)