-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Adding accessibility tags to a label seems to cause the renderer to need more space #2580
Comments
Is this occurring on all platforms or a specific platform? Could you post an example layout (code or XAML) which demonstrates this? I've tried the following layout to reproduce this problem, but both sets of labels lay out identically:
Am I missing a step to reproduce this? |
You are not setting the name nor the helptext fields and I am also setting the inaccessibletree flag to true (not sure if that is the default for labels or not). I am not at work at the moment so can't post a specific example but the issue gets worse as the name or helptext fields get longer it seemed |
ok, some info Firstly I mostly test on Android (easier when using VS2017 on windows), so by the time I deploy to IOS I had fixed the issue so issue is certainly on Android but I have no reason to believe it is not on IOS as well I am only using C# not XAML for this, and all objects go through the same code (unless data bound), labels cause issues as described above but when I switched to using images but with the exact same accessibility settings the layout was fine. The settings used are as following (labeledby is null in these cases, and the sanitize function currently does nothing except adjust the text to correct some bad pronunciations, intree is a bool that is true, name and helptext are strings )
|
oh and please note you should have something visible below the accessible stacklayout as well, that way you should see it move down further than it should be |
It looks like the problem only exists on Android, and setting |
Thanks for the update and more accurate diagnosis |
* [Controls]Add repo for issue #2580 * [Android] Clear Hint before sizing Label * [Controls]Update issue 2580 with more info
ex: |
Add helptext to each of those labels, add for example "tap here to access ..........many things ", add a long string to each of those labels. so they will all expand according to the size of the string. |
It's meant to be fixed on 3.5 and above I believe but I have not had a chance to check yet HOWEVER the issue only happens when the accessibility help text is longer than the original label text and your example above is not setting that and so should not have the issue. This is a different field to the Automation ID field |
Description
Adding accessibility tags to a label seems to cause the renderer to need more space for the label when it is in stacklayouts (Horizontal orientated ones especially). Given accessibility tags are not visible there should be no requirement for more space surely
Steps to Reproduce
Expected Behavior
Labels should show the same with and without the tags
Actual Behavior
Labels seem to 'need' more space on the screen and affect the layour
Basic Information
Screenshots
Reproduction Link
The text was updated successfully, but these errors were encountered: