nolanlawson / fuite

A tool for finding memory leaks in web apps
Apache License 2.0
4.4k stars 71 forks source link

Support websites built with Flutter #16

Open SungJun-Jo opened 2 years ago

SungJun-Jo commented 2 years ago

When I run fuite to a site built with 'flutter', I only receive 'No tests to run.' messages.

Is there a way to test with the "flutter" site?

nolanlawson commented 2 years ago

Does Flutter not have any internal links? I.e. <a href="/foo">? Or does it use some other accessible format, like <div role="link">?

bolshoytoster commented 2 years ago

@nolanlawson it appears flutter application run inside a <canvas>. You can see in this sample site at /html/body/flt-glass-pane//flt-scene-host/flt-scene/flt-canvas-container/canvas. I'm not sure how you'd get around that.

nolanlawson commented 2 years ago

Yeah, it looks like they have a button you can click to "enable accessibility." When I click it, it fills the DOM with a bunch of <flt-semantics-value> elements. But even those elements don't have the proper role for internal links –the role is "generic" when it should be "link". They do have the right "button" role for the Settings button, though.

Screenshot from 2021-12-21 09-24-23

I think in order for fuite to support this out-of-the-box, Flutter should at least have the proper "link" role. But even in that case, fuite would not be able to identify the link (e.g. "/contact" or "/about"). But it could click it, presumably.

As a side note, I think most accessibility advocates would be appalled at how Flutter does it. :sweat_smile: