Reported by jteh on 2014-05-01 03:25
On Facebook, the Requests, Messages and Notifications buttons contain a span which can have a width and height of 0 if there are no requests, etc. The text of the button is inside this span, but because it's an icon, the text is hidden. Unfortunately, this means that when you press enter on this in NVDA browse mode, NVDA clicks in the wrong place. I'd argue this is questionable authoring--if the text isn't visible, it should be aria-label or just off-screen--but regardless, it's happening in the wild. This is probably happening elsewhere too.
To fix this, there are two improvements we can make to _activateNVDAObject in the Gecko vbuf:
- Don't try to click nodes with a width and height of 0. While we're at it, we should probably exclude invisible nodes too.
- As we walk up the ancestors, try doAction before clicking, rather than only trying doAction on the deepest object. We should still stop once we've successfully called doAction or clicked.
Reported by jteh on 2014-05-01 03:25
On Facebook, the Requests, Messages and Notifications buttons contain a span which can have a width and height of 0 if there are no requests, etc. The text of the button is inside this span, but because it's an icon, the text is hidden. Unfortunately, this means that when you press enter on this in NVDA browse mode, NVDA clicks in the wrong place. I'd argue this is questionable authoring--if the text isn't visible, it should be aria-label or just off-screen--but regardless, it's happening in the wild. This is probably happening elsewhere too.
To fix this, there are two improvements we can make to _activateNVDAObject in the Gecko vbuf: