-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arrow function as in the other places (for nested scopes)?
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.
(for nested scopes)
What does this mean?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.