-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: Dismiss BlockMover tooltips on escape key press. #15578
Changes from 7 commits
ae832dc
dc86b93
9a61a03
861351c
ceae20d
62b163d
60bbc6c
8ae4d23
4379cf3
919831f
f0962b3
9741f77
ee9b1a5
0331775
67cfdf7
b23a066
2dfaf5b
10e7a32
a6f7be2
22ef4e2
68dd831
87321bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ function IconButton( props, ref ) { | |
// the children are empty and... | ||
( ! children || ( isArray( children ) && ! children.length ) ) && | ||
// the tooltip is not explicitly disabled. | ||
false !== tooltip | ||
tooltip !== false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Readability improvement. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noting that this will probably conflict with changes currently proposed in #19193 . Regardless if it's an improvement, I might suggest to remove it here, since it's not entirely relevant (or close in proximity) to the intended changes. |
||
) | ||
); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ import { | |
cloneElement, | ||
concatChildren, | ||
} from '@wordpress/element'; | ||
import { KeyboardShortcuts } from '@wordpress/components'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aduth, this is a little bit strange, just by importing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can't import something from the same package using the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Discussed in Slack thread (link requires registration): https://wordpress.slack.com/archives/C02QB2JS7/p1557863367231300 |
||
|
||
/** | ||
* Internal dependencies | ||
|
@@ -104,7 +105,9 @@ class Tooltip extends Component { | |
return cloneElement( child, { | ||
onMouseEnter: this.createToggleIsOver( 'onMouseEnter', true ), | ||
onMouseLeave: this.createToggleIsOver( 'onMouseLeave' ), | ||
onMouseDown: this.createToggleIsOver( 'onMouseDown' ), | ||
onClick: this.createToggleIsOver( 'onClick' ), | ||
onKeyDown: this.createToggleIsOver( 'onKeyDown' ), | ||
onFocus: this.createToggleIsOver( 'onFocus' ), | ||
onBlur: this.createToggleIsOver( 'onBlur' ), | ||
children: concatChildren( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is based on @afercia 's PR
Maybe @afercia might help here since I've iterated over his initial work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly I can't remember why I made that change. That was one year ago 😬 Sorry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aduth @afercia, FYI - I have reverted these changes.