STR (with the NVDA screen reader):
- Open https://mozilla.org/
- Press alt+d, shift+tab to focus the tracking protection icon.
- Press space to open the Protections panel.
- Press b several times to focus "Protection Settings".
- Press enter.
- Expected: Protection settings should open.
- Actual: Nothing happens.
This button (along with several others in that panel) is a XUL toolbarbutton containing a XUL label:
The a11y tree reflects this; i.e. there's a XULLabelAccessible inside a XULToolbarButtonAccessible.
When you press enter, NVDA, as it always does, starts from the deepest accessible (the label). Because there's a click action, NVDA executes it (Accessible::DoAction).
This does call the click handler on the XUL label, which does nothing because this isn't for another control. This then bubbles up to the button. However, the button has a command handler, not a click handler, and that never gets run.
I think the simplest fix here is probably just to override XULLabelAccessible to use the equivalent of JS .click(). Ideally, I'd like to know why this is misbehaving and/or fix the root cause, but given that this is XUL specific and the age of some of this XUL stuff, I'm not sure it's worth going down the rabbit hole.