Skip to content

Commit 9b0d8f6

Browse files
authored
Fix a11y issue on InfoBadge sample (microsoft#1310)
* Add tooltip to fix a11y issue * Fix sample code * Fix faulty formatting and icon
1 parent f0825ac commit 9b0d8f6

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

WinUIGallery/ControlPages/InfoBadgePage.xaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,13 @@
9999

100100
<local:ControlExample x:Name="Example3" HeaderText="Placing an InfoBadge Inside Another Control" HorizontalContentAlignment="Stretch" >
101101
<local:ControlExample.Example>
102-
<Button Padding="0" Width="200" Height="60" HorizontalAlignment="Center" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
102+
<Button Padding="0" Width="200" Height="60" ToolTipService.ToolTip="Refresh required"
103+
HorizontalAlignment="Center" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
103104
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto">
104105
<SymbolIcon Symbol="Sync" HorizontalAlignment="Center"/>
105106
<InfoBadge Background="#C42B1C" HorizontalAlignment="Right" VerticalAlignment="Top">
106107
<InfoBadge.IconSource>
107-
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xF13C;"/>
108+
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xF13C;" />
108109
</InfoBadge.IconSource>
109110
</InfoBadge>
110111
</Grid>
@@ -114,12 +115,13 @@
114115

115116
<local:ControlExample.Xaml>
116117
<x:String xml:space="preserve">
117-
&lt;Button Padding="0" Width="200" Height="60" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"&gt;
118+
&lt;Button Padding="0" Width="200" Height="60" ToolTipService.ToolTip="Refresh required"
119+
HorizontalAlignment="Center" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"&gt;
118120
&lt;Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto"&gt;
119121
&lt;SymbolIcon Symbol="Sync" HorizontalAlignment="Center"/&gt;
120122
&lt;InfoBadge Background="#C42B1C" HorizontalAlignment="Right" VerticalAlignment="Top"&gt;
121123
&lt;InfoBadge.IconSource&gt;
122-
&lt;FontIconSource FontFamily={StaticResource SymbolThemeFontFamily} Glyph="&#xF13C;" /&gt;
124+
&lt;FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xF13C;" /&gt;
123125
&lt;/InfoBadge.IconSource&gt;
124126
&lt;/InfoBadge&gt;
125127
&lt;/Grid&gt;

0 commit comments

Comments
 (0)