How to set aria-activedescendant attribute value #4888
-
Hey, I am trying to set a value for a
This sounds simple but when I add an onClick handler to the list item it returns the child div. Its like its bubbling but I can't stop it. If only I could get the e.target of the list item I can achieve the above. Any ideas? Is there an easier way to achieve this? TIA |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
My solution so far is to get the |
Beta Was this translation helpful? Give feedback.
My solution so far is to get the
event.currentTarget.getAttribute('id'))
value and pass that into auseState
hook. This then allows the selected elements attributes such as the id to be passed around as props. Maybe there is a better way but I think this will do for now :-)