Skip to content

Commit

Permalink
Address accessibility and bug bash issues. (#6141)
Browse files Browse the repository at this point in the history
* Adjust margins to avoid border clipping

* update height

* Fix jaws reading all contents of user control

* update left margins
  • Loading branch information
jgonz120 authored Nov 19, 2024
1 parent 4736534 commit 6e6c475
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
HorizontalScrollBarVisibility="Disabled"
AutomationProperties.Name="{Binding Text, ElementName=_packageId}">
<Grid
Margin="24,0,7,0">
Margin="0,0,7,0">
<Grid.RowDefinitions>
<RowDefinition
Height="Auto" />
Expand All @@ -49,7 +49,7 @@
<Grid
Grid.Row="0"
MinHeight="32"
Margin="0,8">
Margin="24,8,0,8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
Expand Down Expand Up @@ -124,7 +124,7 @@
<!-- project action when in project package manager -->
<nuget:ProjectView
Grid.Row="1"
Margin="0,8"
Margin="24,8,0,8"
x:Name="_projectView"
Visibility="{Binding Path=IsSolution, Converter={StaticResource NegatedBooleanToVisibilityConverter}}" />

Expand All @@ -133,7 +133,7 @@
AutomationProperties.AutomationId="SolutionView"
x:Name="_solutionView"
Grid.Row="1"
Margin="0,8"
Margin="24,8,0,8"
Visibility="{Binding Path=IsSolution,Converter={StaticResource BooleanToVisibilityConverter}}" />

<!-- the splitter is shown when in solution package manager -->
Expand All @@ -153,6 +153,7 @@
<!-- options -->
<Border
Grid.Row="3"
Margin="24,0,0,0"
BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"
BorderThickness="0,1,0,1">
<Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<Setter Property="Background" Value="{DynamicResource {x:Static nuget:Brushes.HeaderBackground}}" />
<Setter Property="FontSize" Value="{Binding FontSize, RelativeSource={RelativeSource AncestorType=UserControl},Converter={StaticResource Font122PercentSizeConverter}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.UIText}}" />
<Setter Property="Padding" Value="20,0,20,0" />
<Setter Property="Padding" Value="12,0,12,0" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource ControlsFocusVisualStyle}" />
<Setter Property="Template">
<Setter.Value>
Expand Down Expand Up @@ -97,7 +97,7 @@
<RowDefinition x:Name="RowDefinition1" Height="Auto"/>
<RowDefinition x:Name="RowDefinition2"/>
</Grid.RowDefinitions>
<TabPanel x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
<TabPanel x:Name="headerPanel" Margin="12,0,0,0" Background="Transparent" Grid.Column="0" IsItemsHost="true" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
<ContentPresenter
Grid.Row="2"
ClipToBounds="True"
Expand Down Expand Up @@ -131,10 +131,11 @@
<DataTemplate DataType="{x:Type nuget:DetailControlModel}">
<nuget:PackageMetadataControl
Focusable="True"
Margin="0,12,0,0"/>
Margin="0,5,0,0"/>
</DataTemplate>
<DataTemplate DataType="{x:Type vm:ReadmePreviewViewModel}">
<nuget:PackageReadmeControl
Margin="22,0,0,0"
x:Name="_packageReadmeControl"/>
</DataTemplate>
</ContentControl.Resources>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"
xmlns:glob="clr-namespace:System.Globalization;assembly=mscorlib"
AutomationProperties.Name=" "
Background="{DynamicResource {x:Static nuget:Brushes.DetailPaneBackground}}"
Foreground="{DynamicResource {x:Static nuget:Brushes.UIText}}"
mc:Ignorable="d"
Expand Down Expand Up @@ -85,6 +86,7 @@
<!-- vulnerabilities info -->
<Border
Grid.Row="0"
Margin="22,0,0,0"
BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"
Visibility="{Binding Path=IsPackageVulnerable,Converter={StaticResource BooleanToVisibilityConverter}}"
BorderThickness="0,0,0,1">
Expand All @@ -100,6 +102,7 @@
<Border
Grid.Row="1"
BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"
Margin="22,0,0,0"
Visibility="{Binding Path=IsPackageDeprecated,Converter={StaticResource BooleanToVisibilityConverter}}"
BorderThickness="0,0,0,1">
<Grid>
Expand All @@ -124,6 +127,7 @@

<!-- descriptions -->
<TextBlock
Margin="22,0,0,0"
Grid.Row="0"
x:Name="_descriptionLabel"
Text="{x:Static nuget:Resources.Label_Description}"
Expand All @@ -133,15 +137,15 @@
Grid.Row="1"
x:Name="_description"
AutomationProperties.LabeledBy="{Binding ElementName=_descriptionLabel}"
Margin="0,8,0,0"
Margin="22,8,0,0"
TextWrapping="Wrap"
Text="{Binding Path=PackageMetadata.Description}" />

<!-- metadata -->
<Grid
Grid.Row="2"
x:Name="_metadataGrid"
Margin="0,8">
Margin="22,8,0,8">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
Expand Down Expand Up @@ -412,7 +416,7 @@
<TreeView
x:Name="_dependencies"
Grid.Row="3"
Margin="-21,0,0,0"
Margin="2,0,0,0"
BorderThickness="0"
Background="{x:Null}"
TreeViewItem.Selected="OnItemSelected"
Expand Down

0 comments on commit 6e6c475

Please sign in to comment.