Skip to content

Allow for more control over event handling for keytips#5064

Merged
jspurlin merged 5 commits intomicrosoft:masterfrom
kelseyyoung:keyou/keytip-events-work
Jun 1, 2018
Merged

Allow for more control over event handling for keytips#5064
jspurlin merged 5 commits intomicrosoft:masterfrom
kelseyyoung:keyou/keytip-events-work

Conversation

@kelseyyoung
Copy link
Copy Markdown
Contributor

@kelseyyoung kelseyyoung commented Jun 1, 2018

Pull request checklist

  • Addresses an existing issue: Fixes #0000
  • Include a change request file using $ npm run change: yes
  • Microsoft Alias (if you have one): keyou

Description of changes

For the onExecute and onReturn callback methods for Keytips we will now pass through both relevant marked elements (the ones marked with data-ktp-execute-target and data-ktp-target). Previously we were just passing through the one marked with data-ktp-execute-target. This comes into play mostly when those two elements are different; for example, a Split Button should execute the secondary button but when dealing with focus the correct behavior is to focus the entire container (which is element marked with data-ktp-target). This change allows a developer to more easily implement their desired behavior when a keytip has been executed or has been returned to

The other change is to not automatically preventDefault any keys that trigger a keytip exit call (Tab, arrow keys, etc). Instead, the event triggering the exit is now passed through to onExitKeytipMode so that if the developer wishes to cancel that event manually they can. This allows the event by default to propagate so regular keyboarding actions will happen when a user hits those keys. This event will be undefined if the exit was called manually from KeytipManager

Focus areas to test

Tested for general functionality to ensure that nothing was broken. Tested that events propagate after exiting (hitting Tab will move to the next focused element)

Microsoft Reviewers: Open in CodeFlow

@kelseyyoung kelseyyoung requested a review from jspurlin June 1, 2018 21:28
changing to a minor change since this extends a few existing APIs
@jspurlin jspurlin merged commit 3bebe7b into microsoft:master Jun 1, 2018
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request Jun 2, 2018
* master: (274 commits)
  Demo Page Refactor Part 1 (microsoft#5055)
  SplitButton: Add aria-roledescription (microsoft#5062)
  Add addins sketch toolkit link (microsoft#5052)
  Dropdown title (microsoft#4983)
  Allow for more control over event handling for keytips (microsoft#5064)
  Build time speed improvements (microsoft#4965)
  Coachmark: Positioning fixes (microsoft#4995)
  Applying package updates.
  Experiments/Nav component: display "show more" link only if there is atleast one hidden link (microsoft#5057)
  Add pointerup listener to exit keytip mode (microsoft#5051)
  Update PULL_REQUEST_TEMPLATE.md
  Update ISSUE_TEMPLATE.md
  Shimmer: resolve conflicts (microsoft#5034)
  Invalid ARIA attributes: Fix empty values (microsoft#5040)
  ComboBox: Correct invalid ARIA attributes. (microsoft#4873) (microsoft#5001)
  ComboBox: Fix submit pending value (microsoft#5048)
  FocusTrapZone - restore last focused descendant element (microsoft#4897)
  Applying package updates.
  Take 2 of the require.resolve change. This time using the "resolve" pkg (microsoft#5031)
  fixing webpack config to allow rush build to complete on a small VM (microsoft#5037)
  ...
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request Jun 3, 2018
* master: (111 commits)
  Moving a variable to be defined sooner so that it is there when failures occur.
  Fix icon imports (microsoft#5069)
  MessageBar: More visible HC color for dismiss and expand buttons (microsoft#5061)
  Fix DetailsList accessibility and add more ARIA hooks (microsoft#5066)
  Update jest (microsoft#5068)
  Demo Page Refactor Part 1 (microsoft#5055)
  SplitButton: Add aria-roledescription (microsoft#5062)
  Add addins sketch toolkit link (microsoft#5052)
  Dropdown title (microsoft#4983)
  Allow for more control over event handling for keytips (microsoft#5064)
  Build time speed improvements (microsoft#4965)
  Coachmark: Positioning fixes (microsoft#4995)
  Applying package updates.
  Experiments/Nav component: display "show more" link only if there is atleast one hidden link (microsoft#5057)
  Add pointerup listener to exit keytip mode (microsoft#5051)
  Update PULL_REQUEST_TEMPLATE.md
  Update ISSUE_TEMPLATE.md
  Shimmer: resolve conflicts (microsoft#5034)
  Invalid ARIA attributes: Fix empty values (microsoft#5040)
  ComboBox: Correct invalid ARIA attributes. (microsoft#4873) (microsoft#5001)
  ...
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 30, 2019
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.

2 participants