Skip to content

Avoid toggle checkbox when clicked on an option's description.#19391

Merged
jinujoseph merged 2 commits intodotnet:masterfrom
pawchen:optionsPage
Jun 8, 2018
Merged

Avoid toggle checkbox when clicked on an option's description.#19391
jinujoseph merged 2 commits intodotnet:masterfrom
pawchen:optionsPage

Conversation

@pawchen
Copy link
Copy Markdown
Contributor

@pawchen pawchen commented May 10, 2017

Customer scenario

"Tools, Options, Text Editor, C#, Code Style, Formatting, New Lines.
It's currently impossible to just select one of the items in the list with mouse click - it registers as a toggle for the checkbox, no matter where on the line you click.

Bugs this fixes:

Fixes #18614

Workarounds, if any

Click on places without description text

Risk

Low

Performance impact

(with a brief justification for that assessment (e.g. "Low perf impact because no extra allocations/no complexity changes" vs. "Low")

Is this a regression from a previous update?

Root cause analysis:

How did we miss it? What tests are we adding to guard against it in the future?

How was the bug found?

(E.g. customer reported it vs. ad hoc testing)

@Pilchie Pilchie requested review from dpoeschl and rchande May 10, 2017 16:34
@Pilchie Pilchie added this to the 15.3 milestone May 10, 2017
@Pilchie
Copy link
Copy Markdown
Member

Pilchie commented May 10, 2017

Tagging @dotnet/roslyn-ide for reviews.

Copy link
Copy Markdown
Contributor

@rchande rchande left a comment

Choose a reason for hiding this comment

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

I built this locally and it works as expected. Thank you!

Copy link
Copy Markdown
Contributor

@dpoeschl dpoeschl left a comment

Choose a reason for hiding this comment

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

Marking as "request changes" until I (or someone else) have a chance to test out accessibility. I'm worried that detaching the TextBlock from the CheckBox will cause them to be focusable independently, causing screen readers to read the wrong thing when the CheckBox is focused (which could happen even if the TextBlock isn't independently focusable) , etc.

@dpoeschl
Copy link
Copy Markdown
Contributor

Also the focus indication border won't be right. I'm not sure of the right way to fix this from an accessibility standpoint. Looking into it.

@pawchen
Copy link
Copy Markdown
Contributor Author

pawchen commented May 11, 2017

Good point, from my observation currently the content in ListItem does not have focus when you use keyboard Tab, the ListItem itself does. But when you press Spacebar the CheckBox gets toggled. This behavior is the same before and after this pr.

Is CheckBox allowed to set some kind of accessibility attribute so one can read that only from screen readers or something? If so I'm happy to add that.

@pawchen
Copy link
Copy Markdown
Contributor Author

pawchen commented May 11, 2017

@pawchen
Copy link
Copy Markdown
Contributor Author

pawchen commented Jun 8, 2017

@dpoeschl I saw your #19638 added AutomationProperties.LabeledBy, so I made the same change here. If more changes needed, please let me know.

@MattGertz
Copy link
Copy Markdown
Contributor

Mondo escrow triage: keeping this as it touches on accessibility.

@jcouv jcouv added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Aug 1, 2017
@tmat tmat modified the milestones: 15.3, 15.5 Sep 7, 2017
@jcouv jcouv modified the milestones: 15.5, 15.7 Jan 31, 2018
@jinujoseph jinujoseph modified the milestones: 15.7, 15.8 Apr 4, 2018
@jinujoseph jinujoseph closed this May 24, 2018
@jinujoseph jinujoseph reopened this May 24, 2018
@jinujoseph jinujoseph closed this Jun 7, 2018
@jinujoseph jinujoseph reopened this Jun 7, 2018
@jinujoseph
Copy link
Copy Markdown
Contributor

This needs validation , @chborl can your help with this

@jinujoseph jinujoseph requested a review from chborl June 7, 2018 23:55
Copy link
Copy Markdown
Contributor

@dpoeschl dpoeschl left a comment

Choose a reason for hiding this comment

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

I approve of the code, but @chborl is testing to make sure.

@chborl
Copy link
Copy Markdown
Contributor

chborl commented Jun 8, 2018

Verified, accessibility is working as expected

@dpoeschl
Copy link
Copy Markdown
Contributor

dpoeschl commented Jun 8, 2018

Whoo, fantastic. Thanks @DiryBoy! @jinujoseph for merge approval

@jinujoseph
Copy link
Copy Markdown
Contributor

approved to merge for 15.8.Preview4

@jinujoseph jinujoseph merged commit e4aaaff into dotnet:master Jun 8, 2018
@Neme12
Copy link
Copy Markdown
Contributor

Neme12 commented Jun 8, 2018

It's currently impossible to just select one of the items in the list with mouse click - it registers as a toggle for the checkbox, no matter where on the line you click.

I'm sorry but I'm a little confused. When I try this in 15.7 or 15.8p2, it's definitely possible and easy to select the item without toggling just by clicking outside of the text.

@Neme12
Copy link
Copy Markdown
Contributor

Neme12 commented Jun 8, 2018

Am I misunderstanding something? Or is it possible this has been fixed since this PR was created?

@dpoeschl
Copy link
Copy Markdown
Contributor

dpoeschl commented Jun 8, 2018

You're understanding that quote correctly, and it doesn't seem to be accurate. I see what you see -- clicking to the right of the text or left of the checkbox works in current VS. I'm not sure if that has changed since the original bug was filed.

But regardless, I do think that not toggling when the use clicks the text is the right call here. I know in many contexts you want the checkbox text to toggle the checkbox, but it doesn't make sense in the context of a listview where you have to select the listviewitem to cause a side effect like the preview updating. At least that's my thinking.

@Neme12
Copy link
Copy Markdown
Contributor

Neme12 commented Jun 8, 2018

Thanks, maybe the issue was just poorly described or investigated originally.

I think I would prefer if clicking the label toggled the checkbox since it's so small and harder to hit, but on the other hand it's true that I've hit it accidentally a few times, so I definitely understand the reasoning here.

@pawchen pawchen deleted the optionsPage branch June 11, 2018 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved to merge Area-IDE cla-already-signed Community The pull request was submitted by a contributor who is not a Microsoft employee.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't use mouse to select formatting option lines