-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
added static prop to remove event listener #2370
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
Conversation
Needs a better name for the prop than |
I like On another note, I don't think |
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.
💃
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.
Why did the favicon change in this PR? Can you revert that?
After that this looks great! 💃
Co-authored-by: Alex Johnson <[email protected]>
This pull request was re-created in 2389 to remove the files included in error. |
As reported on the forum, components with event listeners can cause issues with screen readers.
https://community.plotly.com/t/how-to-remove-events-from-dash-html-components-to-avoid-misinterpretation-by-screen-readers/70477
This PR adds a
disable_n_clicks
prop to all html components, giving the ability to remove the event listener.By default,
n_clicks
will be enabled on any html component that has anid
. Ifn_clicks
is not used in a callback for that component, the event listener can be removed by settingdisable_n_clicks
=True`For example:
No event listener:
html.Div()
html.Div(id="my-id", disable_n_clicks=True)
onClick event listener:
html.Div(id="my-id")
Contributor Checklist
optionals
CHANGELOG.md