summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authorSamantha Houts <samhouts@users.noreply.github.com>2017-06-22 11:19:26 -0700
committerRui Marinho <me@ruimarinho.net>2017-06-22 19:19:26 +0100
commitf80a5e05de0d1a6d8f1c1d81bced85cb468e7813 (patch)
tree35b0f625df314b4a44aeb6298a189cf3f58b3489 /Xamarin.Forms.Controls.Issues
parent5a87b84e866f01411fb8c167ced1fa7e5e5f3261 (diff)
downloadxamarin-forms-f80a5e05de0d1a6d8f1c1d81bced85cb468e7813.tar.gz
xamarin-forms-f80a5e05de0d1a6d8f1c1d81bced85cb468e7813.tar.bz2
xamarin-forms-f80a5e05de0d1a6d8f1c1d81bced85cb468e7813.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')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AndroidHelpText.cs50
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems1
2 files changed, 51 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 07480f11..d77ed10d 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
@@ -296,6 +296,7 @@
<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)Bugzilla39802.cs" />