Lurker News
I originally developed a WASM port of wxWidgets for https://dj.app/. When it came time to open source wxWidgets-wasm, I decided to port another complex app as a test case, and Audacity seemed like the obvious choice. In the process, I also needed to write a new host API for PortAudio for playback and recording in the browser.

https://github.com/ahilss/wxWidgets-wasm
https://github.com/ahilss/portaudio-wasm
https://github.com/ahilss/wavvy

Comments (111) 39 threads

antoineMoPa1 reply#
This is awesome, and also awesome is this:

> I originally developed a WASM port of wxWidgets
I had some fun looking at the commits here[1] and I can imagine a lot of classic wxWidgets apps are going to be ported to wasm now. Congrats, that a lot of dedication!
[1] https://github.com/wxWidgets/wxWidgets/compare/master...ahil...

ClawsOnPaws10 replies#
I feel like I should preemptively apologize and I'm really not trying to knock the project in any way, and the achievement is pretty epic, but those who have seen my username on this site before know what's coming, especially in regards to people seriously considering using WX Widgets on the web... This app is inaccessible. Audacity on its own is already a bit difficult to use with a screen reader, but sadly, this port, unsurprisingly, is even worse. I've managed to at least explore some of the UI using OCR, but it was very cumbersome and I could never get it to do what I wanted. Just uttering my careful warning that you should please, please, please think 3, 4, 5 times before deciding to actually use this UI library for serious projects. The benefits of using what the browser already gives you is that, if you're not going too crazy, accessibility comes for free and there's very little you need to do to make sure that we can still use your app. Again, I understand that this is a port of Audacity, and I believe that what we can do in browsers is pretty amazing and my aim is not to discourage anyone from trying out new things. I'm just saying that this app is 100% screen reader inaccessible so please make sure you have a valid reason for keeping out users with disabilities (hint, you almost never do) by using WX widgets drawn directly to a canvas. And if you do, please think hard about what you can do to still keep your app accessible. I'm sure there are ways to add accessibility to a web port of WX, but if you can, sticking with the things the browsers give you is usually the better idea.
tssva2 replies#
Unless you have a legal requirement to provide accessibility, I encourage everyone to ignore this advice. It is basically letting perfect be the enemy of good. Especially if your project is opensource. Someone that cares, which may even be you at a later date when other things on the to-do list are done, can submit patches to address accessibility later.
Eduard1 reply#
Brace yourself: the "European accessibility act" will soon make accessibility a legal requirement to the private sector, including computers, operating systems, smartphones, and e-commerce.

https://ec.europa.eu/social/main.jsp?catId=1202
Have your popcorn ready to watch how this will freak out plenty of big corporations, rushing to fix their products, services, and websites from their accessibility "short-sightedness" of times past.
Depending on circumstances, failing to comply may cause heavy fines and having the product removed from market.
My guess is this show will peak in 2025.

Continue this thread — 1 reply

HenrikB#
> ... can submit patches to address accessibility later.

I'm not experienced with accessibility, but I pay attention to it whenever I can to increase my own awareness. A very common feedback when it fails (e.g. in software, online conferences, ...) is: "Accessibility must be part of the plan from early on. Trying to add it afterwards basically always fails."

antoineMoPa#
Actually, that's a good thing to keep in mind. I would not use this for anything serious right now, unless for some reason it perfectly fits all requirements one might have. I see this as useful more for fun side projects and as another commenter said, it's possible to improve accessibility later. Maybe text could be rendered as actual text over the canvas?
melony#
Why don't you spend some time harangueing browser and other big tech engineers instead of blaming application developers at every turn? The tools we use are ultimately determined by the companies that make them. Complete GUI toolkits are some of the most expensive software to build. We are limited by whatever's out there. The fact that HTML is a poor framework for rich application development is no fault of your average software engineer. If you want to blame someone, blame upstream and the product managers who run the browser engineering projects.
itsagavin1 reply#
Accessibility is great but its hardly humanity's goal. In most instances your burden is no one else's unless we are talking life or death.
Eduard1 reply#
"Allowing people to participate in society is great but hardly humanity's goal."

Not only does your comment show ignorance of a significant percentage of humans, it also shows you have zero idea of the fact that good accessibility provides service to everyone.
Have you ever struggled to use your smartphone while driving (temporary blindness, because your eyes are focused on the street),
or pressed the wrong button while sitting in a bumpy, shaking bus, because the button you actually wanted to press was way too small (temporary hand coordination disability)?
Accessibility's best practices also exist for everyone to enjoy a great usability.

Continue this thread — 1 reply

lukasb1 reply#
I'm surprised at the pushback against ClawsOnPaws here. Why would you not want to make your apps usable by as many people as possible?
tuckerpo2 replies#
I'd be interested to see the man-hours-needed : people-helped ratio when it comes to user accessibility. There's certainly a threshold where it simply doesn't make sense to put in a man year's worth of work to cater to a proportionally very small percentage of the population.

Continue this thread — 2 replies

ivraatiems2 replies#
I so frequently see this tone with accessibility discussions: "X is not accessible, so don't use it, stop what you're doing, this is bad." I don't think that kind of scolding - which is what it comes off as - is productive for solving the problem of "X is not accessible", because it presumes the problem is unfixable. I believe you wrote your comment in good faith, and I agree accessibility is important. But I think you should consider focusing on this:

> I'm sure there are ways to add accessibility to a web port of WX
and not
> Just uttering my careful warning that you should please, please, please think 3, 4, 5 times before deciding to actually use this UI library for serious projects.
because, as you acknowledge, this is a hobby project. The goal is to do something cool and fun and push boundaries of what's possible. So if pushing accessibility for all web apps is your goal, why not seize this moment to say "hey let's find ways to make WASM apps more accessible" rather than saying "nobody should use this for serious projects"? Why not try to fix it rather than shutting it down? Doesn't it benefit people more if we find a way to make accessibility easy, rather than discouraging people because it's hard?
There are lots of cool and interesting technical problems in there that somebody who takes the time to make something like this could have interest in: How do OCR or other accessibility tools understand canvasses? How can we communicate with them? What addons to WASM or wxWidgets would achieve this goal?

mwcampbell1 reply#
> I don't think that kind of scolding - which is what it comes off as - is productive for solving the problem of "X is not accessible", because it presumes the problem is unfixable.

Of course the problem is fixable. But in the meantime, until it's fixed, a disabled person could fail to get a particular job, or even lose a job they already have, due to an inaccessible application. It's important to remember that the stakes are really that high. If we want to prevent that from happening, I think it's worthwhile to try to persuade application developers to not use inaccessible GUI toolkits, particularly for new projects. We can do that at the same time that we work on making more GUIs accessible.

Continue this thread — 1 reply

Eduard1 reply#
> I so frequently see this tone with accessibility discussions: "X is not accessible, so don't use it, stop what you're doing, this is bad."

'Don't use X for reasons ABC' is a great advice! Why use unusable X if some other thing Y works?
Have you tried using Wavvy on a smartphone? Guess what: it's effectively unusable on smartphones: - touch events aren't leveraged. - hover and right click aren't available, and keyboard shortcuts don't have an appropriate substitute; therefore core audio editing tasks cannot be accomplished in any acceptable manner.
If you are accustomed as I am to use Audacity on a desktop PC - clicking, cutting, shortcutting your sound files effortlessly - but then use Wavvy for the first time, you gonna feel...
disabled.
And that's only a glimpse into what the experience must be for a blind person using Wavvy. Here is an experiment: Close your eyes, use Wavvy. Only OCR allowed...
Being an awesome POC, the accessibility issues aren't Wavvy's "fault", but wxwidget's (and Audacity's by depending on wxwidget).
Considering audio is especially valuable for visually impaired people, having a usable audio editor is very valuable.
Now imagine, as it's so often the case in IT, everybody jumps on the latest bandwagon ("Docker all the things!", "Electron all the things!"), and suddenly everybody "WASM-canvases all the things!".
Now imagine Audacity decides "WASM-canvas" is the way to go for Audacity distribution; no more separate builds for Windows, Linux, macOS, just one WASM-canvas build.
And so do other software projects. And so does your company with its IT department software contribution... more and more, you cannot do your tasks the way you used to...
Back to the comment: constructive critique is always helpful:
- It helps Wavvy to consider using an alternative audio editor. - It helps Audacity to improve their usability and accessibility and consider another widget provider. - It helps wxwidget to fix their accessibility shortcomings.
We discuss problematic tools, libraries, websites, and services all the time at HN - be it for privacy concerns, performance issues and whatnot. We all learn from that why e.g. having a slice of privacy is also a good thing for us personally. So is accessibility, even when it's just the slices involving good layouts, readable fonts, unconfusing button naming, logical tabbing order, consistent shortcuts across applications, big-enough advertising close buttons, unfrustating timepickers... , ..., ...
> I don't think that kind of scolding - which is what it comes off as - is productive for solving the problem of "X is not accessible"...
ClawsOnPaws is neither scolding, nor is it coming off as it for me. They apologize upfront, says "please, please, please", says "my aim is not to discourage anyone from trying out new things".
If there was one polite, constructive comment at HN it be it.
> ...because it presumes the problem is unfixable.
I don't understand how you came to the conclusion that this was even remotely implied.
> But I think you should consider focusing on this: "I'm sure there are ways to add accessibility to a web port of WX"
I think you should consider focusing on this: "I'm sure wxwidgets could follow basic accessibility best practices and leverage accessibility APIs which are provided by operating systems already for years."
> why not seize this moment to say "hey let's find ways to make WASM apps more accessible"
I'm not an WASM expert, but I'm versed in accessibility features specified by W3C and implemented in browsers. As WASM can interact with Javascript, and Javascript allows all kinds of web accessibility standards interactions, this part is solved. What's required then is a mapping from OS accessibility calls (wxwidgets' duty) to browserland (WASM's side). I don't know about WASM's status here, but wxwidgets will have to make its own first step. ...
ClawsOnPaws' comment is a tangent comment on an important aspect of any application: usability. It gives awesome insights about why Wavvy is unusable for visually-impaired users.
- I learned that Audacity has its own problems with accessibility; - I learned that Audacity uses wxWidgets, which especially is bad when it comes to accessibility. That already is great to know, as I'm now informed to avoid it in my projects - with bad accessibility always comes a generally bad usability. - Now port this to the web as in the currently presented Wavvy form and you get a hilarious clusterfuck of inaccessibility. I learned from the comment that usability by default and without explicit consideration just degrates with each layer added and each porting. - useful information that there exists some OCR software for what's currently shown on the screen.
In essence, ClawsOnPaws' comment has everything in it for why I come to Hacker News.

Continue this thread — 1 reply

naet1 reply#
This may sound insensitive, but accessibility isn't usually the #1 concern when developing new projects. It is usually tacked on later in an update because it isn't a core feature and it affects only a small subset of users.

Rather than encourage everyone to never use WX widgets for any reason in a website, maybe you should be encouraging people (or working yourself) to add this accessibility feature.

hutzlibu2 replies#
". It is usually tacked on later in an update because it isn't a core feature and it affects only a small subset of users"

But thats not optimal, right? But most do not care, as long as they are not part if that subset.
I mean, I find it hard to care too much either, when my main concern are all the missing and buggy features, that needs fixing first..

Continue this thread — 2 replies

greggman31 reply#
It's not just accessabilty, nothing but English works. Even the keyboard doesn't work as it's hardcoded to keycodes so click the top of the track and click "Name..." and try to enter é and nope let alone 音

I'm not trying to knock the app or the work put into wxWidgets. But, we need to not regress in supporting the entire world and not just the English speaking subset. I don't really want to go back to the 80s/90s. I like that in general, with HTML, international text input/editing just works.

pseudalopex2 replies#
Other wxWidgets apps don't have this problem.

Continue this thread — 2 replies

mwcampbell1 reply#
> I feel like I should preemptively apologize

You should not. A mentor once told me that we disabled people tend to apologize too much. You are right to point out the problem of accessibility in this context, despite the negative responses you've received.
Of all the GUI toolkits with wasm ports, IMO wx is the most amenable to using native HTML controls rather than doing everything with canvas. I'm sure that kind of port would take more work though.

ivraatiems#
I've seen this discussion happen before and the same problem be pointed out re: WASM and canvas[1]. (I'm sure there are more examples than just that.) The trouble is that Canvas exists for a good reason: It is much more time-intensive to re-implement something like Audacity in the DOM than it is to render Audacity to a canvas.

So if we wanted to spend the time, could we be over-focusing on "just manipulate the DOM" as a solution? WASM conceives of the web browser as the "OS", or at least as hardware, and JavaScript as a means to manipulate that "hardware" (ask the browser to do things). Most operating systems expose APIs that let you do accessible things (read the screen, automate UI actions, etc.). Then frameworks like QT, for example, hook into those APIs from their own code to provide generic accessibility regardless of OS.[2]
So, maybe one half of the solution here is that to try to develop a neutral API WASM can use to emit accessibility information which can then be read by JavaScript running in the browser, and transformed into objects in the DOM? Then you could write an interface to that from your framework (something like QT would be a better starting point than wxWidgets, though, admittedly) and you'd get what you need.
Not that any of that is easy. But it would be fun, and naively, seems not too much harder than "rewrite app X in WASM to use the DOM" for much broader impact.
Maybe this discussion already happened and there are very good reasons not to do this - but I couldn't find anything about it in previous arguments.
[1] https://news.ycombinator.com/item?id=17349170 [2] https://doc.qt.io/qt-6/accessible.html

suby#
I feel like it should be possible to build a universal accessibility tool using machine learning that relies on vision rather than native framework UI/toolkit support. The problem seems much more tractable than other AI projects like self-driving cars, and also more in the realm of existing successes that we've already seen with machine learning. The problem of inaccessible apps will only get worse as wasm becomes more mature, I feel like the only way to win is to sidestep the problem.
nu11ptr#
Nice! Is it possible to merge this WASM port back into the wxWidgets main project? It just seems like a valuable target addition and could breathe some life back into wxWidgets.
ilitirit2 replies#
> Audacity seemed like the obvious choice

Tangential question, but why did Audacity seem like the obvious choice? Not a knock on the product - I use it often - but I'm just curious about why it was chosen.

samwillis1 reply#
Audacity is one of the largest (if not the largest?) still active projects using wxWidgets, it seems like fairly obvious if you are somewhat aware of that.
tambourine_man3 replies#
Why did wxWidgets fell out of favor?
samwillis#
I don't think it did, the world just moved to mobile and web based apps, then backward towards the desktop with Electron.

I would say wxWidget and QT are probably still the most used cross platform desktop GUI toolkits.

ekianjo#
Not used much anywhere.
klodolph#
I think there were some problems with wxWidgets and generally people moved to Qt, if they were still making cross-platform desktop apps, and if they haven’t migrated to Electron.
ahilss#
It's probably the most visible project using the wxWidgets framework and in the audio domain which fits well with my experience building the DJ app.
fareesh#
I recently needed a crop component that allowed my users to record something and trim it to their desired size. I ended up using wavesurfer.js with the regions plugin. It seems like there are very few components that meet this type of requirement.

Load more comments