winforms icon indicating copy to clipboard operation
winforms copied to clipboard

Epic - ListViewSubItems in the ListView have incorrect behavior

Open SergeySmirnov-Akvelon opened this issue 3 years ago • 9 comments

Common

Case 1:

  • [x] The checkbox does not have its accessibility object in the ListView

Actual behavior: image

Expected behavior: The checkbox should have its accessibility object in the ListView

Details

Case 1 (regression from #3223):

  • [ ] A yellow rectangle is drawn for the entire ListViewItem instead of the selected ListViewSubItem

Actual behavior: Issue-4690-details-case1

Expected behavior: image

Case 2:

  • [x] The image does not have its accessibility object in the ListView

Actual behavior: image

Expected behavior: image

Case 3:

  • [ ] ListViewSubItem of an ListViewItem are not displayed in the Inspector tree when the ListViewItem is in a ListViewGroup (may be fixed in #4678)

Actual behavior: image

Expected behavior: image

LargeIcon

Case 1:

  • [ ] ListViewSubItem in a ListView do not have accessibility objects

Actual behavior: image

Expected behavior: image

List

Case 1:

  • [ ] ListViewSubItem in a ListView do not have accessibility objects

Actual behavior: image

Expected behavior: image

SmallIcon

Case 1:

  • [ ] ListViewSubItem in a ListView do not have accessibility objects

Actual behavior: image

Expected behavior: image

Tile

Case 1 (regression from #3223):

  • [x] ListViewSubItem of an ListViewItem are not displayed in the Inspector tree when the ListViewItem is in a ListViewGroup (#4678)

Actual behavior: image

Expected behavior: image

Case 2 (regression from #3223):

  • [ ] The rectangle is not displayed for a ListViewSubItem when the user hovers over it or selects in the Inspector tree (#4679)

Actual behavior: image

Expected behavior: image

SergeySmirnov-Akvelon avatar Mar 17 '21 09:03 SergeySmirnov-Akvelon

I'll take Common.Case1

dkazennov avatar Jul 20 '22 13:07 dkazennov

Regarding Common.Case1:

ListViewItem components of the ListView control have accessible objects. Debug and accessible tools show that these accessible objects are being created.

But the main issue is: accessible tools do not fix checking the checkboxes of ListViewItems. The Narrator doesn't announces checks. ListViewItem can contain checkbox, but it doesn't behave like CheckBox control.

I have changed the ListViewItemBaseAccessibleObject: added announcement by Narrator the same way as in TreeView

dkazennov avatar Aug 02 '22 16:08 dkazennov

Only a single task is fixed so far.

Tanya-Solyanik avatar Aug 09 '22 21:08 Tanya-Solyanik

Verified this issue in the latest .Net 8.0 SDK build:8.0.100-alpha.1.22478.15, Details-Case 2 was fixed. The image already has its accessibility object in the ListView. please check below screenshot: image Untitled

MandiMan avatar Sep 29 '22 07:09 MandiMan

Is it makes sense to add ListViewItemImageAccessibleObject to ListViewItem in List, Tile, SmallIcon, LagreIcon styles? In these styles, we haven't SubItems, and currently, the tree looks neat:

List1

ListViewItem1 ListViewItem2 ListViewItem3

But in my opinion, if we will rework it like Details style it looks cumbersome (especially for ListViewItem without Image):

List1

ListViewItem1

ListViewSubItem1

ListViewItem2

ListViewImage ListViewSubItem1

ListViewItem3

ListViewSubItem1

In all of these styles, a ListViewItem cannot contain more than one SubItem. @merriemcgaw what do you think if we add child AccessibleObject only for Image like a Subtitle (see image below)? image

NikitaSemenovAkvelon avatar Oct 03 '22 11:10 NikitaSemenovAkvelon

It sounds reasonable to me but also want @Tanya-Solyanik's input here too.

merriemcgaw avatar Oct 05 '22 22:10 merriemcgaw

@NikitaSemenovAkvelon - I did not understand your suggestion. you are saying that this:

List1

ListViewItem1

ListViewSubItem1`

adds hierarchy where none is needed, right? But what is the alternative? No subitem?

ListView1

ListViewItem2

ListViewItemImage

And a different question - is it possible to set accessible name on this image?

Tanya-Solyanik avatar Oct 06 '22 02:10 Tanya-Solyanik

@Tanya-Solyanik exactly. ListViewItemAccessibleObject will have only children like an image or subtitle without subItem. I attached the image above with an example of how it works now with subtitles. Item1 has a subtitle, subsequently, it has a child AO, but Item2 hasn't a subtitle therefore it is without any children.

And a different question - is it possible to set accessible name on this image?

I don't see any easy way to set it without adding a new property to ListViewItem which will be used in the AO.

NikitaSemenovAkvelon avatar Oct 06 '22 04:10 NikitaSemenovAkvelon

I don't see any easy way to set it without adding a new property to ListViewItem which will be used in the AO.

This is a problem. There is no point in announcing "ListVIewItem2, image" because the user would not know what that image is. It's valuable to have image node in the hierarchy only when that image had text associated with it. But let's wait until this issue is raised by external users.

I think hierarchy with no mandatory subitems is reasonable.

Tanya-Solyanik avatar Oct 07 '22 23:10 Tanya-Solyanik

Tested the remaining cases which are still unchecked.

  • Details.Case 1. OK Screenshot 2022-10-31 160430

  • Details.Case 3. OK Screenshot 2022-10-31 161012

  • Tile.Case 2. OK Screenshot 2022-10-31 161201

I suggest marking these cases as completed.

NikitaSemenovAkvelon avatar Oct 31 '22 12:10 NikitaSemenovAkvelon

@merriemcgaw I think, we can close the issue, doesn't it?

NikitaSemenovAkvelon avatar Nov 09 '22 06:11 NikitaSemenovAkvelon

Verified on latest 8.0 build .NET 8.0.100-alpha.1.22607.6, a part of the issue was fixed. User can see information about image via accessibility tools in LargeIcon, SmallIcon and List views. please check below screenshot: LargeIcon view: LargeIcon view SmallIcon view: SmallIcon view List view: List view

MandiMan avatar Dec 08 '22 08:12 MandiMan