axe-core icon indicating copy to clipboard operation
axe-core copied to clipboard

Feature request: If CSS display:none causes failure, pull it into code snip.

Open DavidMacDonald opened this issue 7 years ago • 5 comments

The now closed issue #597 shows that this feature would save a lot of trouble.

DavidMacDonald avatar Nov 02 '17 16:11 DavidMacDonald

To capture what we just discussed as a team: I like this idea, however it isn't straight-forward to do. The CSS can come from anywhere, and the accessible name calculation code is pretty complicated. Passing the CSS isn't as simple for other scenarios as it might be for this one. So we'd have to do a lot of API work or rewriting of code to make this possible. But I agree that it would have helped in this scenario.

marcysutton avatar Nov 02 '17 17:11 marcysutton

Perhaps in the interim, add to the list of things to check at the bottom, a text message that CSS display:none may be hiding the label.

DavidMacDonald avatar Nov 03 '17 11:11 DavidMacDonald

@marcysutton I've been thinking about this one a bit. How about we do the same thing with the "fail" and "pass" messages that we did with the "incomplete": allow them to be objects with multiple messages. You can set one of them from the check. That doesn't just help us with consistency and with better messages, it also solves our message templating problem. Since by doing this we no longer need to put in conditional statements in the messages. Simple string replacements can put the variables in the right place, and that's all we need.

WilcoFiers avatar Feb 10 '18 21:02 WilcoFiers

@WilcoFiers close?

dylanb avatar Mar 12 '21 13:03 dylanb

I'm looking at this with fresh eyes. I think there is value in us recording for each node we return whether it's visible or not. We can do that on DqElement. We'd need to consider if we want to track how an element is hidden, there are different ways. I'm going to keep this open for now.

WilcoFiers avatar Jan 26 '22 16:01 WilcoFiers