Putting handlers on the root is a loss of semantics, and causes the intention of handlers to be no longer communicated well to the assistive technology.
The current behaviour
NVDA reads clickable due to event delegation performed at the root level.
The expected behaviour
NVDA should not read clickable.
Could react provide a way for authors to arbitrarily delegate events to the document node?
Bug: Root event delegation causes accessibiliy issues #23170
React version: 17.0.2
Steps To Reproduce
Link to code example:
From the above minimal example, you can see how events delegated to the root cause NVDA to announce the element as clickable.
If we take this other example:
The
element will not be read as clickable.
Putting handlers on the root is a loss of semantics, and causes the intention of handlers to be no longer communicated well to the assistive technology.
The current behaviour
NVDA reads clickable due to event delegation performed at the root level.
The expected behaviour
NVDA should not read clickable. Could react provide a way for authors to arbitrarily delegate events to the document node?