Where possible don’t add client-side onclick event handlers to controls that aren't typically interactive (e.g. a Panel Control).
If you do want to do this, you should also add a tabindex=0
attribute and onkeypress event handlers so the functionality is also available to users navigating the page using just the keyboard.
As an alternative, you could add phrasing content such as Text Controls and Image Controls to a Button Control to create the same effect.