diff options
author | Samantha Houts <samhouts@users.noreply.github.com> | 2017-06-22 11:19:26 -0700 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2017-06-22 19:26:53 +0100 |
commit | 595344f31aa108275bfbef9abc6a3ae68b79c52b (patch) | |
tree | 7af41ca3cb1a6d0ac110bc6e8a2fd7426fb6e1d6 /Xamarin.Forms.Controls.Issues | |
parent | 8b014183fe21da9d9e221cc49d6c1750e52098aa (diff) | |
download | xamarin-forms-595344f31aa108275bfbef9abc6a3ae68b79c52b.tar.gz xamarin-forms-595344f31aa108275bfbef9abc6a3ae68b79c52b.tar.bz2 xamarin-forms-595344f31aa108275bfbef9abc6a3ae68b79c52b.zip |
[Android] Remove the ". " on empty labels (Accessibility) on Fastrenderers (#915)
* [Android] Concatenate Name/HelpText better
Also remove some parameters that were added to workaround an issue that
no longer exists.
* Add repro
* Listen to Stephane
he's usually right
* oops, didn't save
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
2 files changed, 52 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AndroidHelpText.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AndroidHelpText.cs new file mode 100644 index 00000000..014e50f6 --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AndroidHelpText.cs @@ -0,0 +1,50 @@ +using Xamarin.Forms.CustomAttributes; +using Xamarin.Forms.Internals; + +#if UITEST && __ANDROID__ +using Xamarin.UITest; +using NUnit.Framework; +#endif + +// Apply the default category of "Issues" to all of the tests in this assembly +// We use this as a catch-all for tests which haven't been individually categorized +#if UITEST && __ANDROID__ +[assembly: NUnit.Framework.Category("Issues")] +#endif + +namespace Xamarin.Forms.Controls.Issues +{ + [Preserve(AllMembers = true)] + [Issue(IssueTracker.None, 0, "Android shows . in empty labels because of a11y Name/HelpText", PlatformAffected.Android)] + public class AndroidHelpText : TestContentPage + { + [Preserve(AllMembers = true)] + public class HintLabel : Label + { + public const string Success = "SUCCESS"; + } + + protected override void Init() + { + var label = new Label + { + Text = $"There should be an empty label below this one. If the label shows a period (.), this test has failed. There should also be a label that says \"{HintLabel.Success}\"." + }; + + var emptyLabel = new Label { HorizontalTextAlignment = TextAlignment.Center }; + + var customLabel = new HintLabel { HorizontalTextAlignment = TextAlignment.Center }; ; + + Content = new StackLayout { Children = { label, emptyLabel, customLabel } }; + } + +#if UITEST && __ANDROID__ + [Test] + public void AndroidHelpTextTest() + { + RunningApp.WaitForNoElement(q => q.Marked(".")); + RunningApp.WaitForElement(q => q.Marked(HintLabel.Success)); + } +#endif + } +}
\ No newline at end of file diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems index 0d808d27..14397ae5 100644 --- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems @@ -279,6 +279,8 @@ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla53909.cs" /> <Compile Include="$(MSBuildThisFileDirectory)ListViewNRE.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla55745.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)AndroidHelpText.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32830.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla55365.cs" /> <Compile Include="$(MSBuildThisFileDirectory)_Template.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Issue1028.cs" /> |