Skip to content

Commit

Permalink
Merge pull request #2153 from Microsoft/v2.0.18093.1_accessibilityfixes
Browse files Browse the repository at this point in the history
V2.0.18093.1 accessibilityfixes
  • Loading branch information
sibille authored Apr 10, 2018
2 parents 915631c + 957be86 commit ef19106
Show file tree
Hide file tree
Showing 41 changed files with 633 additions and 135 deletions.
1 change: 1 addition & 0 deletions code/src/Core/Locations/JunctionNativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ internal static class JunctionNativeMethods
private const uint IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003;

#pragma warning restore SA1310 // Field names must not contain underscore

/// <summary>
/// This prefix indicates to NTFS that the path is to be treated as a non-interpreted
/// path in the virtual file system.
Expand Down

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions code/src/UI/Controls/CodeViewer.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<WebBrowser x:Name="webBrowser"
ScrollViewer.VerticalScrollBarVisibility="Hidden"
Visibility="Collapsed"
AutomationProperties.Name="{x:Static strings:StringRes.AccessibilityCodeViewerControl}"
LoadCompleted="WebBrowser_LoadCompleted" />
</Grid>
</UserControl>
25 changes: 22 additions & 3 deletions code/src/UI/Controls/ImageEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ public ImageEx()
Focusable = false;
}

protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
{
base.OnPropertyChanged(e);
if (e.Property == ForegroundProperty)
{
if (_isInitialized && Content != null && !IsXamlImage)
{
ChangeColorOfBitmap(Content, (Foreground as SolidColorBrush).Color);
}
}
}

public override void OnApplyTemplate()
{
_isInitialized = true;
Expand All @@ -68,9 +80,7 @@ private void Initialize()
Content = CreateFromBitmap();
}

var sourceExtension = Path.GetExtension(SourcePath);

if (File.Exists(SourcePath) && sourceExtension?.Equals(XamlExtension, StringComparison.OrdinalIgnoreCase) == true)
if (IsXamlImage)
{
Content = CreateFromXaml();
}
Expand All @@ -81,6 +91,15 @@ private void Initialize()
}
}

private bool IsXamlImage
{
get
{
var sourceExtension = Path.GetExtension(SourcePath);
return File.Exists(SourcePath) && sourceExtension?.Equals(XamlExtension, StringComparison.OrdinalIgnoreCase) == true;
}
}

private static void ChangeColorOfBitmap(object sender, Color setColor)
{
var writeableBmp = (sender as Image).Source as WriteableBitmap;
Expand Down
18 changes: 18 additions & 0 deletions code/src/UI/Resources/StringRes.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions code/src/UI/Resources/StringRes.cs-CZ.resx
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,12 @@
<value>Pořadí stránek můžete změnit klávesovými zkratkami Ctrl+Šipka nahoru a Ctrl+Šipka dolů.</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data>
<data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
8 changes: 8 additions & 0 deletions code/src/UI/Resources/StringRes.de-DE.resx
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,12 @@
<value>Verwenden Sie die Tasten STRG+NACH-UNTEN, um die Reihenfolge der Seiten zu ändern.</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data>
<data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
7 changes: 7 additions & 0 deletions code/src/UI/Resources/StringRes.es-ES.resx
Original file line number Diff line number Diff line change
Expand Up @@ -644,5 +644,12 @@
<data name="ReorderPageHelpText" xml:space="preserve">
<value>Usar CTRL+flecha hacia arriba o CTRL+flecha hacia abajo para cambiar el orden de la página</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data><data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
8 changes: 8 additions & 0 deletions code/src/UI/Resources/StringRes.fr-FR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,12 @@
<value>Utilisez ctrl + flèche du haut ou ctrl + flèche du bas pour changer l'ordre des pages</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data>
<data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
8 changes: 8 additions & 0 deletions code/src/UI/Resources/StringRes.it-IT.resx
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,12 @@
<value>Usa CTRL+freccia su o CTRL+freccia giù per cambiare l'ordine delle pagine</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data>
<data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
8 changes: 8 additions & 0 deletions code/src/UI/Resources/StringRes.ja-JP.resx
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,12 @@
<value>Ctrl + 上方向キーまたは Ctrl + 下方向キーを使用して、ページの順序を変更します</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data>
<data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
8 changes: 8 additions & 0 deletions code/src/UI/Resources/StringRes.ko-KR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,12 @@
<value>ctrl + 위쪽/아래쪽 화살표를 사용하여 페이지 순서 변경</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data>
<data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
8 changes: 8 additions & 0 deletions code/src/UI/Resources/StringRes.pl-PL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,12 @@
<value>Kolejność stron można zmienić za pomocą klawiszy Ctrl+strzałka w górę i Ctrl+strzałka w dół</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data>
<data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
8 changes: 8 additions & 0 deletions code/src/UI/Resources/StringRes.pt-BR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,12 @@
<value>Use ctrl+seta para cima ou ctrl+seta para baixo para alterar a ordem das páginas</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data>
<data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
8 changes: 8 additions & 0 deletions code/src/UI/Resources/StringRes.resx
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,12 @@
<value>Use ctrl+up arrow or ctrl+down arrow to change page order</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data>
<data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
8 changes: 8 additions & 0 deletions code/src/UI/Resources/StringRes.ru-RU.resx
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,12 @@
<value>Используйте клавиши CTRL+СТРЕЛКА ВВЕРХ или CTRL+СТРЕЛКА ВНИЗ для изменения порядка страниц</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data>
<data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
7 changes: 7 additions & 0 deletions code/src/UI/Resources/StringRes.tr-TR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -644,5 +644,12 @@
<data name="ReorderPageHelpText" xml:space="preserve">
<value>Sayfa sırasını değiştirmek için Ctrl+yukarı ok veya Ctrl+aşağı ok tuşlarını kullanın</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data><data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
8 changes: 8 additions & 0 deletions code/src/UI/Resources/StringRes.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,12 @@
<value>使用 Ctrl+ 向上键或 Ctrl+ 向下键来更改页面顺序</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data>
<data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
8 changes: 8 additions & 0 deletions code/src/UI/Resources/StringRes.zh-TW.resx
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,12 @@
<value>使用 ctrl+向上鍵或 ctrl+向下鍵變更頁面順序</value>
<comment>Reorder selected user pages message in accessibility help text</comment>
</data>
<data name="ButtonDetailsHelpText" xml:space="preserve">
<value>Details of {0}</value>
<comment>Button details help text. {0}: name of template</comment>
</data>
<data name="HelpTextPressEnterToAddItem" xml:space="preserve">
<value>Press enter to add {0}</value>
<comment>Help text to add page or feature item. {0}: name of page or feature</comment>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,20 @@ public Brush CardTitleText
set { SetValue(CardTitleTextProperty, value); }
}

public static readonly DependencyProperty ChangesSummaryDetailFileHeaderBackgroundProperty = DependencyProperty.Register("ChangesSummaryDetailFileHeaderBackground", typeof(Brush), typeof(UIStylesService), new PropertyMetadata(null));
public static readonly DependencyProperty ChangesSummaryDetailFileHeaderProperty = DependencyProperty.Register("ChangesSummaryDetailFileHeader", typeof(Brush), typeof(UIStylesService), new PropertyMetadata(null));

public Brush ChangesSummaryDetailFileHeaderBackground
public Brush ChangesSummaryDetailFileHeader
{
get { return (Brush)GetValue(ChangesSummaryDetailFileHeaderBackgroundProperty); }
set { SetValue(ChangesSummaryDetailFileHeaderBackgroundProperty, value); }
get { return (Brush)GetValue(ChangesSummaryDetailFileHeaderProperty); }
set { SetValue(ChangesSummaryDetailFileHeaderProperty, value); }
}

public static readonly DependencyProperty ChangesSummaryDetailFileHeaderTextProperty = DependencyProperty.Register("ChangesSummaryDetailFileHeaderText", typeof(Brush), typeof(UIStylesService), new PropertyMetadata(null));

public Brush ChangesSummaryDetailFileHeaderText
{
get { return (Brush)GetValue(ChangesSummaryDetailFileHeaderTextProperty); }
set { SetValue(ChangesSummaryDetailFileHeaderTextProperty, value); }
}

public static readonly DependencyProperty DeleteTemplateIconProperty = DependencyProperty.Register("DeleteTemplateIcon", typeof(Brush), typeof(UIStylesService), new PropertyMetadata(null));
Expand Down
3 changes: 2 additions & 1 deletion code/src/UI/Services/Styles/UIStylesService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ private void SetWindowsTemplateStudioColors()
CardFooterText = _stylesProvider.GetColor("WindowsTemplateStudio", "CardFooterText");
CardIcon = _stylesProvider.GetColor("WindowsTemplateStudio", "CardIcon");
CardTitleText = _stylesProvider.GetColor("WindowsTemplateStudio", "CardTitleText");
ChangesSummaryDetailFileHeaderBackground = _stylesProvider.GetColor("WindowsTemplateStudio", "ChangesSummaryDetailFileHeaderBackground");
ChangesSummaryDetailFileHeader = _stylesProvider.GetColor("WindowsTemplateStudio", "ChangesSummaryDetailFileHeader");
ChangesSummaryDetailFileHeaderText = _stylesProvider.GetColor("WindowsTemplateStudio", "ChangesSummaryDetailFileHeaderText");
DeleteTemplateIcon = _stylesProvider.GetColor("WindowsTemplateStudio", "DeleteTemplateIcon");
GridHeadingBackground = _stylesProvider.GetColor("WindowsTemplateStudio", "GridHeadingBackground");
GridHeadingHoverBackground = _stylesProvider.GetColor("WindowsTemplateStudio", "GridHeadingHoverBackground");
Expand Down
12 changes: 8 additions & 4 deletions code/src/UI/Services/Styles/WindowsTemplateStudioColors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ public static class WindowsTemplateStudioColors
public static ThemeResourceKey CardTitleTextColorKey { get { return _CardTitleTextColorKey ?? (_CardTitleTextColorKey = new ThemeResourceKey(Category, "CardTitleText", ThemeResourceKeyType.BackgroundColor)); } }
public static ThemeResourceKey CardTitleTextBrushKey { get { return _CardTitleTextBrushKey ?? (_CardTitleTextBrushKey = new ThemeResourceKey(Category, "CardTitleText", ThemeResourceKeyType.BackgroundBrush)); } }

private static ThemeResourceKey _ChangesSummaryDetailFileHeaderBackgroundColorKey;
private static ThemeResourceKey _ChangesSummaryDetailFileHeaderBackgroundBrushKey;
public static ThemeResourceKey ChangesSummaryDetailFileHeaderBackgroundColorKey { get { return _ChangesSummaryDetailFileHeaderBackgroundColorKey ?? (_ChangesSummaryDetailFileHeaderBackgroundColorKey = new ThemeResourceKey(Category, "ChangesSummaryDetailFileHeaderBackground", ThemeResourceKeyType.BackgroundColor)); } }
public static ThemeResourceKey ChangesSummaryDetailFileHeaderBackgroundBrushKey { get { return _ChangesSummaryDetailFileHeaderBackgroundBrushKey ?? (_ChangesSummaryDetailFileHeaderBackgroundBrushKey = new ThemeResourceKey(Category, "ChangesSummaryDetailFileHeaderBackground", ThemeResourceKeyType.BackgroundBrush)); } }
private static ThemeResourceKey _ChangesSummaryDetailFileHeaderColorKey;
private static ThemeResourceKey _ChangesSummaryDetailFileHeaderBrushKey;
private static ThemeResourceKey _ChangesSummaryDetailFileHeaderTextColorKey;
private static ThemeResourceKey _ChangesSummaryDetailFileHeaderTextBrushKey;
public static ThemeResourceKey ChangesSummaryDetailFileHeaderColorKey { get { return _ChangesSummaryDetailFileHeaderColorKey ?? (_ChangesSummaryDetailFileHeaderColorKey = new ThemeResourceKey(Category, "ChangesSummaryDetailFileHeader", ThemeResourceKeyType.BackgroundColor)); } }
public static ThemeResourceKey ChangesSummaryDetailFileHeaderBrushKey { get { return _ChangesSummaryDetailFileHeaderBrushKey ?? (_ChangesSummaryDetailFileHeaderBrushKey = new ThemeResourceKey(Category, "ChangesSummaryDetailFileHeader", ThemeResourceKeyType.BackgroundBrush)); } }
public static ThemeResourceKey ChangesSummaryDetailFileHeaderTextColorKey { get { return _ChangesSummaryDetailFileHeaderTextColorKey ?? (_ChangesSummaryDetailFileHeaderTextColorKey = new ThemeResourceKey(Category, "ChangesSummaryDetailFileHeader", ThemeResourceKeyType.ForegroundColor)); } }
public static ThemeResourceKey ChangesSummaryDetailFileHeaderTextBrushKey { get { return _ChangesSummaryDetailFileHeaderTextBrushKey ?? (_ChangesSummaryDetailFileHeaderTextBrushKey = new ThemeResourceKey(Category, "ChangesSummaryDetailFileHeader", ThemeResourceKeyType.ForegroundBrush)); } }

private static ThemeResourceKey _DeleteTemplateIconColorKey;
private static ThemeResourceKey _DeleteTemplateIconBrushKey;
Expand Down
Loading

0 comments on commit ef19106

Please sign in to comment.