Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Android] Fix for Talkback reporting incorrect number of list items (#4090) #10151

Closed
wants to merge 2 commits into from

Conversation

nicolasdeory
Copy link

Description of Change

The native ListView control in Android had two phantom items (header and footer). Even if they were invisible, they still counted toward the children count. Therefore, a list with 2 items would get narrated as "a list of 4 items".

Issues Resolved

API Changes

None

Platforms Affected

  • Android

Behavioral/Visual Changes

None

Before/After Screenshots

Not applicable

Testing Procedure

Run Issue4090 in Control Gallery.
When clicking 'Browse' or 'About', Talkback should report that the element is in a list of 2 items.

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@dnfclas
Copy link

dnfclas commented Mar 31, 2020

CLA assistant check
All CLA requirements met.

@samhouts
Copy link
Member

samhouts commented Apr 2, 2020

@nicolasdeory It looks like too many commits are here. Can you please rebase on 4.6.0? Thanks!

@nicolasdeory
Copy link
Author

@samhouts I've done the rebase and the extra commits are gone, but the PR isn't updating for me, it still displays 25 commits. Should I create a new PR?

@samhouts
Copy link
Member

samhouts commented Apr 3, 2020

@nicolasdeory Did you do a force push? It looks like you may have done a normal push, and that typically undoes a rebase.

@nicolasdeory nicolasdeory force-pushed the fix-4090 branch 2 times, most recently from 9587d5a to 7659f3b Compare April 3, 2020 20:36
@nicolasdeory
Copy link
Author

@samhouts It should be fixed now. Sorry for the inconvenience!

@PureWeen PureWeen requested review from rachelkang and removed request for StephaneDelcroix and samhouts November 12, 2020 17:19
@PureWeen PureWeen assigned rachelkang and unassigned jsuarezruiz Nov 12, 2020
@PureWeen PureWeen assigned PureWeen and unassigned samhouts Jan 12, 2021
@PureWeen PureWeen changed the base branch from main to 4.8.0 January 18, 2021 19:32
@PureWeen
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's been awhile so if you don't have time to check this one out @nicolasdeory we can take it over but it looks like this PR is causing a number of tests to fail

image

@nicolasdeory
Copy link
Author

nicolasdeory commented Jan 20, 2021

@PureWeen Unfortunately I can't take a thorough look at the moment. I'm puzzled as to why those tests are failing, especially because the code change is minimal. Could it have something to do with the sample?

@mounikakola
Copy link

Any update on this?

@jfversluis
Copy link
Member

jfversluis commented Jan 14, 2022

@mounikakola can you confirm this is still an issue with the latest Xamarin.Forms stable? Even when you have the feature flag enabled as described in #1529 (comment)

If yes, and you would still like to see this fixed, would you be willing and able to take this on yourself? I see that this functionality has been moved over for .NET MAUI where it will definitely be fixed, but if you would like to see it for Forms as well, the best chance of getting it in would be if you could help us. Thanks!

Closing this one for now as we're focussing this for .NET MAUI for now and/or might be already fixed. Either way there were a lot of failing tests with this that still need to be fixed in order to get this merged.

@jfversluis jfversluis closed this Jan 14, 2022
heikow10 added a commit to heikow10/Xamarin.Forms that referenced this pull request Apr 11, 2022
heikow10 added a commit to heikow10/Xamarin.Forms that referenced this pull request Apr 11, 2022
jfversluis pushed a commit to heikow10/Xamarin.Forms that referenced this pull request Jul 7, 2022
jfversluis pushed a commit that referenced this pull request Jul 11, 2022
* Added repro sample (#15305)

* remove header and footer of ListView when they are empty

taken from PR #10151

* fix ListView index on click when ListView has no header
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android] Talkback reports incorrect number of list items
8 participants