Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Accessibility] Change DataGridView's Row/Column counting with starting at 1, not 0 #7154

Closed
Olina-Zhang opened this issue May 9, 2022 · 12 comments · Fixed by #10243
Closed
Assignees
Labels
Priority:3 Work that is nice to have tenet-accessibility MAS violation, UIA issue; problems with accessibility standards

Comments

@Olina-Zhang
Copy link
Member

.NET version

.Net 7.0 SDK build: 7.0.100-preview.5.22256.2

Did it work in .NET Framework?

No

Did it work in any of the earlier releases of .NET Core or .NET 5+?

No, this is not a regression issue. And @merriemcgaw wants a runtime issue to ask to change the counting with starting at 1.

Issue description

We need to change DataGridView's Row/Column counting with starting at 1, not 0

Accessibility Insight:
image

Inspect:
image

Narrator:
image

Steps to reproduce

Repro steps:

  1. Open attached application
    DataGridView_Sample.zip
  2. Build and run
  3. Use Accessibility tools: AccessiblityInsight, Narrator, Inspect focus on the first DataGridView cell, to observe the rows/columns starting count
@Olina-Zhang Olina-Zhang added tenet-accessibility MAS violation, UIA issue; problems with accessibility standards untriaged The team needs to look at this issue in the next triage labels May 9, 2022
@tinodo
Copy link

tinodo commented May 12, 2022

+1 on this issue!

@dreddy-work dreddy-work added the waiting-on-team This work item needs to be discussed with team or is waiting on team action in order to proceed label May 12, 2022
@dreddy-work
Copy link
Member

dreddy-work commented May 12, 2022

This would be breaking change unless just tweaking accessibility string.

@dreddy-work dreddy-work removed waiting-on-team This work item needs to be discussed with team or is waiting on team action in order to proceed untriaged The team needs to look at this issue in the next triage labels May 12, 2022
@dreddy-work
Copy link
Member

@vladimir-krestov , can you guys take a look and see if we can fix this just for accessibility?

@merriemcgaw
Copy link
Member

We would likely have to make some sort of configuration option for the developer to opt in to counting starting from 1 rather than zero. I can't see any other way to not break our users who have worked around this issue for years. I imagine there's lots of automation that depends on this bug, and probably some AT has worked around this too and we don't want to break either scenario.

@vladimir-krestov
Copy link
Contributor

vladimir-krestov commented May 27, 2022

It's easy to change-just add +1 to index:

DataGridViewRowAccessibleObject.Name:
image

And DataGridViewCellAccessibleObject.Row/Column:
image


But we need to decide, how to turn on/off our change. My first proposal is to use something like EnableVisualStyles method for Application.
Thoughts?

@merriemcgaw
Copy link
Member

We would definitely need to quirk this so that those who depend on the "starts at 0" behavior are not broken. @dreddy-work is working on a quirking strategy for the HDPI scary changes, and I think for this one we'd need to follow that same pattern. Let's hold off on this for a little while, so that we can consider how people and assistive tech can use the new behavior. It's not an urgent issue by any means.

@vladimir-krestov vladimir-krestov added the waiting-on-team This work item needs to be discussed with team or is waiting on team action in order to proceed label Jul 13, 2022
@Tanya-Solyanik Tanya-Solyanik added this to the .NET 7.0 milestone Jul 14, 2022
@merriemcgaw
Copy link
Member

This is a major change in behavior and will need to be behind a quirk of some kind. I don't think we can get this in 7, so let's shoot for 8.

@dreddy-work dreddy-work modified the milestones: .NET 7.0, .NET 8.0 Aug 1, 2022
@Tanya-Solyanik Tanya-Solyanik modified the milestones: .NET 8.0, .NET 9.0 Jul 31, 2023
@Tanya-Solyanik Tanya-Solyanik added the untriaged The team needs to look at this issue in the next triage label Jul 31, 2023
@Tanya-Solyanik Tanya-Solyanik removed this from the .NET 9.0 milestone Jul 31, 2023
@Tanya-Solyanik
Copy link
Member

@merriemcgaw - had anyone requested this change? This is breaking from .NET Framework and the first column/row is indexed as a zero in the code.

@merriemcgaw
Copy link
Member

The accessibility team asked us to consider it. I think it is more of a usability rather than accessibility item and I think fixing it may cause problems with screen readers. That said, it is really illogical to a lot of users.

@tinodo
Copy link

tinodo commented Aug 1, 2023

We're not asking to start numbering columns and rows from 1 in CODE, but merely how these columns and rows are ANNOUNCED to users through screen readers.
Could we please stop moving this thing from one .NET version to another and either do it or decide not to do it?

@Tanya-Solyanik Tanya-Solyanik added this to the .NET 9.0 milestone Aug 1, 2023
@Tanya-Solyanik Tanya-Solyanik removed waiting-on-team This work item needs to be discussed with team or is waiting on team action in order to proceed untriaged The team needs to look at this issue in the next triage labels Aug 1, 2023
@Tanya-Solyanik Tanya-Solyanik added the Priority:3 Work that is nice to have label Aug 1, 2023
@Tanya-Solyanik
Copy link
Member

Please put this change under a switch. Sample implementation is here -

internal static partial class LocalAppContextSwitches

@Philip-Wang01
Copy link
Contributor

Verified the issue on 9.0.100-alpha.1.23580.4 with dlls build form main branch, the issue has been fixed that the DataGridView's Row/Column counting with starting at 1, not 0.
Accessibility Insight:
image
Inspect:
image
Narrator:
image

@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Priority:3 Work that is nice to have tenet-accessibility MAS violation, UIA issue; problems with accessibility standards
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants