Closed stevenbriscoeca closed 5 years ago
Thanks for the thorough steps to reproduce! I know there are a few instances where screen readers trigger mouse events.
I'm curious what happens if you move focus to another element before hiding the button? Screen readers classically have issues when a focused element is removed from the DOM (and I think display: none
will do the same thing). The official term is "freak out" because they don't know what happened to the thing they were focused on.
Screen reader "freak out" => When an element that has focus is destroyed #accessibility #html5 #javascript via @jared_w_smith
— Arley (@arleytriana) February 23, 2015
What if you changed .hide
to this CSS so the button is only visually hidden but isn't removed from the DOM?
.hide {
clip: rect(1px 1px 1px 1px); /* IE 6/7 */
clip: rect(1px, 1px, 1px, 1px);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
Thank you for the quick reply.
I tried the css it still changes to mouse.
I also tried focus on the input text before closing and it's the same result https://codepen.io/anon/pen/VzVjVW?editors=1111
Do you think this could be fixed in what-input? My gut tells me this is browser related.
What do you think we should do?
It's possible that NVDA is firing a mouse down event when activating a control. I'll look into it but it probably won't be today. Hopefully, I'll be able to check it out tomorrow or Thursday.
Okay sounds good. This is open source, so you can do it when ever you have some free time and if you want to! I really appreciate it :)
Any update on this? :)
Unfortunately, I haven't had time to look into this yet, but I've kept the email in my inbox so it doesn't go far off my radar.
I looked into this and was able to reproduce this issue on the What Input demo page. You can reproduce it by tabbing around to get "keyboard" triggered, then make your way to the checkbox and use the spacebar to toggle the checked state. This will flip the input state to "mouse". After a bunch of experimentation, I found that only with the NVDA+Firefox combination no keyboard events are fired at all.
I created this codepen to test: https://codepen.io/ten1seven/pen/yzPYrb?editors=1010
In other browsers, you should see the keyup
/keydown
events firing, but with NVDA+Firefox only mouse events fire, even down to the checkbox itself. I'm honestly not sure where to go from here. It might be worth filing an issue with NVDA.
Alright, do you want me to file a bug https://github.com/nvaccess/nvda ?
I'll obviously give you credit for your codepen and whatnot
Sounds good if you're up for submitting the bug!
Hello,
When I am using NVDA, what-input incorrectly changes the what-input to mouse in a specific circumstance.
Steps to reproduce : Notes : Use NVDA and firefox.
You will see what-input go from keyboard to mouse. It should stay in keyboard.
Without NVDA, it stays to keyboard.