Skip to content

Commit

Permalink
feat(WASM): Set a11y properties all the time
Browse files Browse the repository at this point in the history
  • Loading branch information
ajpinedam committed Sep 25, 2020
1 parent ec46a0e commit 2c126b4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Uno.UI/UI/Xaml/Automation/AutomationProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,13 @@ private static void OnAutomationIdChanged(DependencyObject dependencyObject, Dep
view.ContentDescription = (string)args.NewValue;
}
#elif __WASM__
if (FrameworkElementHelper.IsUiAutomationMappingEnabled && dependencyObject is UIElement uiElement)
if (dependencyObject is UIElement uiElement)
{
uiElement.SetAttribute("xamlautomationid", (string)args.NewValue);
if (FrameworkElementHelper.IsUiAutomationMappingEnabled)
{
uiElement.SetAttribute("xamlautomationid", (string)args.NewValue);
}

uiElement.SetAttribute("aria-label", (string)args.NewValue);

var role = FindHtmlRole(uiElement);
Expand Down

0 comments on commit 2c126b4

Please sign in to comment.