[Tooltip] Meet dismissable WCAG criterion#22376
Conversation
|
@material-ui/core: parsed: +0.06% , gzip: +0.12% |
| /** | ||
| * @param {KeyboardEvent} nativeEvent | ||
| */ | ||
| function handleKeyDown(nativeEvent) { |
There was a problem hiding this comment.
arrow function as in the other places (for nested scopes)?
There was a problem hiding this comment.
(for nested scopes)
What does this mean?
There was a problem hiding this comment.
I thought we were following named function for top-level scope and arrow function for nested levels, following pros and cons of https://stackoverflow.com/questions/34361379/are-arrow-functions-and-functions-equivalent-exchangeable
| function handleKeyDown(nativeEvent) { | |
| const handleKeyDown = (nativeEvent) => |
There was a problem hiding this comment.
Does it matter? They end up as function anyway.
|
I have just realized that a native |
Fun fact: The native title not being dismissable wouldn't violate that success criterion 🤷♂️ I wonder which corporate representative got that in so that their page is not liable. |
Closes #17279
Meets "dismissable" in WCAG 2.1 1.4.13:
by listening to a global "Escape" keydown. This is similar to SCR39.
Follow-up:
To fully meet 1.4.13 we have to work on "hoverable" first which should also be explained in the docs.