Skip to content

Conversation

@vladimir-krestov
Copy link
Contributor

@vladimir-krestov vladimir-krestov commented Aug 23, 2019

Fixes #1680

Original bug:

  • Bug 528682: Accessibility: WinForm DataGridView's CellErrorTextNeeded tooltip data isn't accessible to customers only using the keyboard

Proposed changes

  • Implement IKeyboardToolTip interface for DataGridViewCell class to use the KeyboardToolTipStateMachine
  • Add ProcessControlShiftF10Keys method to have the ability to activate/deactivate a cell tooltip using hotkeys (Control+Shift+F10 like as WPF)
  • Add IsActivatedByKeyboard property which stores keyboard tooltip state
  • Add KeyboardToolTip property which stores keyboard tooltip info and settings
  • Propose to set for the keyboard tooltip InitialDelay and ReshowDelay equal to 0.5 seconds (see gif below).
  • ShowCellToolTips property turn on/off keyboard and mouse tooltips activation together
  • ShowCellKeyboardToolTips property turn on/off keyboard tooltips activation only (ShowCellToolTips property must be true)
  • Use ShowCellToolTips to enable users to turn on/off mouse and keyboard tooltips display

  • Add default tooltip text to resources for all cells (needs review translation)

Customer Impact

  • Now a user has a possibility to get DataGridView cell tooltip text or error text with using only a keyboard (Tab/arrow navigation, hotkeys)
  • Minor bugs of mouse and keyboard tooltip conflicts have little impact on users

Regression?

  • No

Risk

  • Adding public ShowCellKeyboardToolTips property is risky. In the future, it will be problematic to change the implementation of keyboard tooltip activation without affecting users who already use this property.
    Instead, we can use ShowCellToolTips property, but it turns on/off both keyboard and mouse tooltips activation

    None. It was decided to use ShowCellToolTips property only.

Screenshots

Before

  • There is no way to activate a tooltip using a keyboard

After

  • Cell tooltips are displayed when tab/keyboard arrow navigation
  • Cell tooltip is activated/deactivated when clicking Control+Shift+F10 hotkey (end of the gif)
    NH5SSK7eId

Test methodology

  • Manual testing

Test environment(s)

  • Microsoft Windows [Version 10.0.18362.239]
  • .NET Core Version: 3.0.100-preview9-013722
Microsoft Reviewers: Open in CodeFlow

@vladimir-krestov vladimir-krestov added a11y-MAS High Priority - Accessibility violation of Microsoft Accessibility Standards 🚧 work in progress Work that is current in progress labels Aug 23, 2019
@vladimir-krestov vladimir-krestov requested a review from a team as a code owner August 23, 2019 10:28
@vladimir-krestov vladimir-krestov self-assigned this Aug 23, 2019
@codecov
Copy link

codecov bot commented Aug 23, 2019

Codecov Report

Merging #1681 into release/3.1 will increase coverage by 0.00548%.
The diff coverage is 32.6087%.

@@                 Coverage Diff                  @@
##           release/3.1      #1681         +/-   ##
====================================================
+ Coverage     26.14871%   26.1542%   +0.00549%     
====================================================
  Files              804        804                 
  Lines           267845     268022        +177     
  Branches         37979      38008         +29     
====================================================
+ Hits             70038      70099         +61     
- Misses          192797     192903        +106     
- Partials          5010       5020         +10
Flag Coverage Δ
#Debug 26.1542% <32.6087%> (+0.00548%) ⬆️
#production 26.1542% <32.6087%> (+0.00548%) ⬆️
#test 100% <ø> (ø) ⬆️

@vladimir-krestov vladimir-krestov force-pushed the dev/v-vlkres/DataGridViewToolTip branch from a8c0eec to 38aada1 Compare August 23, 2019 13:59
Copy link
Contributor Author

@vladimir-krestov vladimir-krestov left a comment

Choose a reason for hiding this comment

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

Currently, there are 3 minor bugs:

  1. Sometimes the keyboard tooltip disappears if a mouse was located in its place.
  2. Sometimes after calling the mouse tooltip and selecting a cell using the keyboard, the keyboard tooltip does not appear.

ToolTipsConflicts

  1. Sometimes a keyboard tooltip flickers near the mouse pointer when a cell selecting if set a short initialization time for the tooltip. This will be fixed as a separate issue because this bug is present in the ToolStrip of the master branch.

Flicker

@vladimir-krestov vladimir-krestov force-pushed the dev/v-vlkres/DataGridViewToolTip branch from 0238069 to 4a809c0 Compare August 26, 2019 12:27
@ghost ghost added waiting-author-feedback The team requires more information from the author and removed waiting-author-feedback The team requires more information from the author labels Aug 27, 2019
@vladimir-krestov
Copy link
Contributor Author

@RussKie, could you please confirm the following changes:

  • DataGridViewButtonCell/DataGridViewImageCell have default tooltip localized text as "Button"/"Image" if tooltip text is not set
    (It was were added to resources)
  • By default, KeyboardToolTip has ReshowDelay = 0.5s and InitialDelay = 0.5s.
    (Please see gifs)

@RussKie
Copy link
Contributor

RussKie commented Sep 2, 2019

  • DataGridViewButtonCell/DataGridViewImageCell have default tooltip localized text as "Button"/"Image" if tooltip text is not set
    (It was were added to resources)
  • By default, KeyboardToolTip has ReshowDelay = 0.5s and InitialDelay = 0.5s.
    (Please see gifs)

👍
If further changes will be required we'll add make them later. Thank you

@vladimir-krestov vladimir-krestov added the waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) label Sep 3, 2019
@vladimir-krestov vladimir-krestov changed the base branch from master to release/3.0 September 4, 2019 06:23
@vladimir-krestov
Copy link
Contributor Author

Merge conflicts and commits list will be fixed after test issues fixing.

@vladimir-krestov vladimir-krestov force-pushed the dev/v-vlkres/DataGridViewToolTip branch from a79286f to b5b0a9f Compare September 9, 2019 14:06
@RussKie RussKie added this to the 3.1 milestone Sep 9, 2019
@vladimir-krestov vladimir-krestov changed the base branch from release/3.0 to release/3.1 September 10, 2019 09:40
@vladimir-krestov vladimir-krestov force-pushed the dev/v-vlkres/DataGridViewToolTip branch 2 times, most recently from 5b66df7 to a85b3b4 Compare September 17, 2019 12:21
@vladimir-krestov vladimir-krestov added waiting-approval and removed waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) labels Sep 19, 2019
@vladimir-krestov
Copy link
Contributor Author

Testers approved this fix.

@RussKie RussKie removed a11y-MAS High Priority - Accessibility violation of Microsoft Accessibility Standards 🚧 work in progress Work that is current in progress labels Sep 19, 2019
RussKie
RussKie previously approved these changes Sep 19, 2019
@vladimir-krestov vladimir-krestov force-pushed the dev/v-vlkres/DataGridViewToolTip branch 2 times, most recently from c57e84f to 9867270 Compare September 22, 2019 09:33
Fixed mouse tooltip conflicts

Implemented got-lost focus event handling. Added hooking when add column or row

Implemented unhooking

Added Image and Button resources

Added hotkeys

Code refactoring

Removed ShowCellErrorsKeyboardTooTip property. Changed an access to keyboard tooltips

Fixed CancelToolTipPopup

Fixed resources

Some code refactoring

Deactivated mouse tooltip when DataGridView get focus

Fixed tooltip activation when sorting

Fixed review points

Removed extra spaces

Fixed CI build error

Fixed review points

Fixed a tooltip activation when adding a row. Fxed GetNeighboringToolsRectangles method

Added cell neighbors unit test

Code refactoring

Fixed test issues

Fixed OnLostFocus method

Code refactoring

Fixed getting cell ToolTip text. Made code refactoring.

Code refactoring

Fixed hooking

Fixed test issues 2

Removed extra spaces

Code refactoring
@vladimir-krestov vladimir-krestov force-pushed the dev/v-vlkres/DataGridViewToolTip branch from 9867270 to 0fc4044 Compare September 22, 2019 10:04
@vladimir-krestov vladimir-krestov changed the title WIP: [Keyboard][Accessibility]: Fixing activation DataGridView cell tooltips with using a keyboard [Keyboard][Accessibility]: Fixing activation DataGridView cell tooltips with using a keyboard Sep 23, 2019
@merriemcgaw
Copy link
Member

Business case approved. Please merge when @RussKie approves the code.

1 similar comment
@merriemcgaw
Copy link
Member

Business case approved. Please merge when @RussKie approves the code.

@RussKie RussKie merged commit 066b5db into release/3.1 Sep 24, 2019
@RussKie RussKie deleted the dev/v-vlkres/DataGridViewToolTip branch September 24, 2019 21:39
@ghost ghost locked as resolved and limited conversation to collaborators Feb 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants