Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give buttons accessible names #1962

Merged
merged 3 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions common/Strings/en-us/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,8 @@
<value>Close</value>
<comment>Name of the button that hides the banner</comment>
</data>
<data name="CloseButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
<value>Close</value>
<comment>Name of the button that closes a view</comment>
</data>
</root>
7 changes: 4 additions & 3 deletions common/Views/CloseButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Uid="CloseButton"
Style="{StaticResource DefaultButtonStyle}"
HorizontalAlignment="Right"
VerticalAlignment="Top"
BorderThickness="0"
Background="Transparent"
Padding="10">

<TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="{ThemeResource BodyTextBlockFontSize}"
Text="&#xE711;" />
<TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="{ThemeResource BodyTextBlockFontSize}"
Text="&#xE711;" />
</Button>
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@
<value>Pin</value>
<comment>Label for button that pins the widget</comment>
</data>
<data name="PinButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
<value>Pin</value>
<comment>Name of the button that pins the widget</comment>
</data>
<data name="UpdateWidgetButton.Content" xml:space="preserve">
<value>Update</value>
<comment>Label for button that updates the widget</comment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
<Grid Grid.Row="2"
x:Name="PinRow">
<Button x:Name="PinButton"
x:Uid="PinButton"
Style="{ThemeResource AccentButtonStyle}"
VerticalAlignment="Bottom" HorizontalAlignment="Center"
Visibility="Collapsed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,8 @@
<value>Extensions Banner</value>
<comment>Name of the Extensions banner for automation</comment>
</data>
<data name="MoreOptionsButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
<value>More options</value>
<comment>Name of the button that brings up the "More options" menu</comment>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
<Grid MaxWidth="{ThemeResource MaxPageContentWidth}" Margin="{ThemeResource ContentPageMargin}">
<ScrollViewer VerticalScrollBarVisibility="Auto" Margin="0,22,0,0">
<StackPanel>
<commonviews:Banner TextWidth="350"
<commonviews:Banner x:Uid="ExtensionsBanner"
TextWidth="350"
Visibility="{x:Bind BannerViewModel.ShowExtensionsBanner,Mode=OneWay}"
HideButtonVisibility="true"
HideButtonCommand="{x:Bind BannerViewModel.HideExtensionsBannerButtonCommand,Mode=OneWay}"
ButtonCommand="{x:Bind BannerViewModel.ExtensionsBannerButtonCommand,Mode=OneWay}"
x:Uid="ExtensionsBanner"
BackgroundSource="{ThemeResource ExtensionsBannerBack}"
OverlaySource="{ThemeResource ExtensionsBannerFront}"
Margin="0,0,0,28" />
Expand All @@ -73,7 +73,8 @@
<ctControls:SettingsExpander.HeaderIcon>
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xea86;"/>
</ctControls:SettingsExpander.HeaderIcon>
<Button Content="&#xe712;"
<Button x:Uid="MoreOptionsButton"
Content="&#xe712;"
Height="36" Width="36"
FontFamily="{StaticResource SymbolThemeFontFamily}"
Background="Transparent"
Expand Down
Loading