7 ms·
Why assume ignorance/difficulty when the reality is not everyone is going to focus on adding/maintaining accessibility when they haven't even built out their be
by zamadatix 6y ago
Why assume ignorance/difficulty when the reality is not everyone is going to focus on adding/maintaining accessibility when they haven't even built out their beta MIT licensed side project? It'd certainly be nice if everything just automagically worked about accessible UI but we're not there yet (getting anything to automagically work in UI is a pain still).
As far as what we can do about it I suppose outside of somehow translating thoughts into perfect UI automatically we can try to add coverage to these projects as we can prioritize it. After all that's why they are being built in the open with an open license, so others can help add functionality.
- spicybright 6y agoExactly this. Yes, accessibility is very important, but as of right now, it takes non-zero effort to implement correctly. So you must balance that with other priorities depending on the goals of the project.
- thwarted 6y agoThe goals of the project includes "custom buttons"? There's so much functionality that you get for free/low effort if you don't feel the need to customize everything to the nines.
- Wowfunhappy 6y agoWhen I decided to make myself a personal website this summer, my goals were: • It has to have lots of custom animations, because animations are fun. • It has to work well in weird text-based browsers like Links, because being able to load my site up in those feels cool. • It has to support Safari 6, because that's the last version of Safari that works in Snow Leopard. If it's a non-commercial project, the goals can be whatever the fuck the author wants them to be.
- spicybright 6y agoRight? One of my peeves with a lot of developers is when they treat every programming project like it's a commercial start up. There's no reason "learning to implement custom buttons" can't be on your list of goals.
- wlesieutre 6y agoDepends on whether the idea behind "learn to implement custom buttons" is "because I want to have custom buttons on my website" or "because I want to be able to use this knowledge on future projects." If you want to learn to make custom buttons with the idea being to be able to apply that knowledge elsewhere, you probably ought to learn to do them accessibly.
- gregmac 6y agoThere are about 100 ways to do any given thing when building web apps, and it's a constantly shifting landscape where "the way" you do a bunch of things is different every time you start a new app (at least it feels that way to me). Being really good at front-end (to the point you know when to use a native control or not, which "standard" features you can rely on, how to think about accessibility+responsive+dark mode+ad blockers+low bandwidth+seo etc) is an entire discipline that takes a lot of effort to stay current in. If you use pure, standard html with default styling you still end up with a page using bad colors and Times New Roman that looks straight out of the 90s. If that's not the look you're going for, you need to do some customization (via CSS) and the difference between "some" and "to the nines" is not exactly a clear line -- even to people that have specialized their careers in front-end dev.
- thwarted 6y agoIf the decision comes down to "I can't get the exact shade of cornflower blue I want on this button unless I make it a div, but that will hurt accessibility" and you chose the exact shade of cornflower blue, your priorities are wrong. And not just because you hurt accessibility, but because you probably made more work for yourself. We went through this 15 years ago with custom scroll bars that didn't look like scroll bars, didn't operate like scroll bars and didn't interact like scroll bars, all because it could happen. An Ian Malcom quote comes to mind.
- gregmac 6y agoI don't think that's a conscious decision though. What happens is: - I can't get this exact shade of cornflower blue - Oh, here's a solution that works! Oh, it doesn't work in all browsers - Hmm, here's a stack overflow answer that says use a div. It's 5 years old, is that current? Dunno but it has 457 up votes and works Some people are concerned about accessibility but the JavaScript doesn't work in iOS. Others have iOS support but they screwed up cache headers and it's super slow on any low bandwidth connection. Balancing all those things (and that's a very incomplete list) is hard and it's not fair to expect side/hobby/oss projects to do it 100%.
- iratewizard 6y agoI don't understand this entitled attitude. The OP can build things however they want. If their style of building makes it hard for the 0.05% of internet traffic that uses a screen reader, it's not open season to be a shitty person. If I were the OP and received feedback like this, I'd personally start aria describing how you all need a better mix of anti-anxiety and antidepressants.
- josephg 6y agoDo you think buildings shouldn’t be wheelchair accessible, because not many people are wheelchair bound? Most western societies have made the decision culturally that even though its disproportionately expensive, that the cost is worth spending to (as much as is reasonable) make things accessible. (Legislators are on board in many countries too.) I see your point - this website is really cool and its classic HN to have the top comment complain about a minor point. But also, because accessibility and security are invisible to most of us, vigilance is the only way it’ll happen.
- iratewizard 6y ago> Do you think buildings shouldn’t be wheelchair accessible, because not many people are wheelchair bound? Businesses should choose to make their business accessible based on cost and profitability. Your eternal vigilance is a joke. It makes sane people wonder what shortcoming you're compensating for.
- josephg 6y agoI'm making up for fact that, but for a twist of fate, it could have been me sitting in that wheelchair. It could be me blind, browsing the web with a screen reader and a hope that the websites I visit aren't an incomprehensible mess of divs. Which only happens because somebody was too lazy to spend 5 minutes googling how to style a button with CSS. I believe its worth burning some of society's resources inefficiently in exchange for evening out the scales of chance a little. Its the same reason I think everyone has a right to free healthcare. (Which is completely non-controversial here in australia.) Call me names all day if you need to. I stand by my politics.
- deleted 6y ago[deleted]
- kevingadd 6y agoReplacing <div class="button "> with <button> is basically zero effort. it's fewer characters and less JS code to construct!
- robertoandred 6y agoIt takes more effort to do it wrong.
- ddevault 6y agoUsers with accessibility needs deserve to be able to use software as much as any of the rest of us do, and we should pride ourselves in making time to address their needs. Try reading your comment from the perspective of someone who is unable to use this software because of the choices you've made. Someday, perhaps sooner than you think, you might find yourself in their shoes. In this case, mwcampbell refers to a specific problem which is entirely avoidable and endemic of a flagrant disregard for the needs of accessibility - it would have been EASIER to make it accessible in Matt's example.
- zamadatix 6y agoI agree that if we make something we intend for others to use it should aim to be accessible to others. Nobody here is saying others shouldn't be able to use software the problem is software is never complete and for a project like this getting the thing working may reasonably happen before you add ARIA attributes without the cause being enmity to others. I might be missing something, how would it have been easier to make by adding additional ARIA markup to the UI?
- pegasus 6y agoThey could have just used off-the-shelf components for the first iteration.
- zamadatix 6y agoUsing the builtin browser button element isn't without other things to then fix in the software either, "(getting anything to automagically work in UI is a pain still)". Would it have been accessible though, sure. But I'm going to assume that the developer didn't spin a wheel and decide to add React to the project rather it was intentionally chosen for some reason. Similarly in their React button version they could have added ARIA attributes. The problem statement was never "is there a way it could have been made accessible" it's that there isn't going to be a fullproof automagical way to make it accessible without having to do additional work in the project be it styling the default button or changing it's handlers or adding accessibility to a custom button. i.e. it's not a matter of technical exercise for how it could have been accessible it's being realistic about why it wasn't.
- pickpuck 6y ago> > The buttons are clickable divs, not actual HTML buttons > It'd certainly be nice if everything just automagically worked about accessible UI but we're not there yet OP's suggestion is that the author should have used native HTML <button>, a simple solution that has worked since the beginning. But you're right that it's not so elegant in reality: You must remember to add type="button" attribute, otherwise clicking it could trigger page reload accidentally. Most browsers still force <button> to retain its default display property. Within flowing text, it can never break naturally onto the next line, whereas an <a> link can. It also can't be a flex or grid container in certain browsers, so you often need an inner element for proper spacing/positioning. Note that the inner element would need to be a <span> not a <div> because <button> can only contain phrasing elements.
- chrismorgan 6y agoI quibble over a few of your points: (a) type="button" only does anything if the button is form-associated—otherwise it’s the default. And even then, if your button within a form is semantically submit buttons (as the Create button here is), the semantically-best technique is instead to leave the button as a submit button, and instead of using a click handler on the button, to use a submit handler on the form and do event.preventDefault() within it. (b) That buttons don’t wrap externally is a feature, not a bug. Links should wrap. Buttons should not. The point here is that it is a button, so it should use <button>, and this is just one of the reasons why. (c) <button> not supporting `display: flex` was Firefox-specific and fixed almost four years ago in Firefox 52. I believe the last fiddly alignment corner cases were fixed over two years ago also. So you can safely forget about that limitation now. (d) You shouldn’t want to put a div inside a button, any sort of button (whether <button> or any other technique). That’s not what buttons are.
- Stratoscope 6y ago> if your button within a form is semantically submit buttons (as the Create button here is), the semantically-best technique is instead to leave the button as a submit button, and instead of using a click handler on the button, to use a submit handler on the form and do event.preventDefault() within it. This is my biggest pet peeve with so many modern websites and web-based desktop apps. It's not just a matter of being semantically correct in some abstract sense, it completely breaks the user experience for a keyboard user like me. If you have a form with, say, two text fields, I expect to be able to type into the first field, hit Tab to the second one, type into that one, and press Enter to submit. All too often, when I press Enter, nothing happens! This is because of the very problem you described: the developer used a click event handler on the submit button instead of a submit handler on the form as they should have. It's such an easy thing to get right; why do so many get it wrong?
- wffurr 6y agoHow hard is it to just use a damn <button> For a button on a web page? Basic HTML already works perfectly in a screen reader with no effort. It requires effort to screw it up.
- zamadatix 6y agoI think https://news.ycombinator.com/item?id=25593536 https://news.ycombinator.com/item?id=25593536 from the larger comment chain said it pretty well. I also just commented something that may be relevant to these thoughts as well https://news.ycombinator.com/item?id=25594659 https://news.ycombinator.com/item?id=25594659. The child comment by pickpuck is also quite informative. The tl;dr is it's not about there being a way it could have been accessible it's that there was no out of the box answer that both did what the project needed and what was needed to have the button be accessible. If you are here to point out there is a way it could have been done well of course, so could everything else on every backlog of every open source project but things get taken off of the backlog by people planning work and putting the time in to do them not by people mentioning there are easy ways it could be done hence why this wasn't done (and also why this/any piece of software isn't perfect as everyone would like).
- rhencke 6y agoPerhaps you could open a pull request to fix this.
- Vinnl 6y agoThat would presumably be roughly equivalent to send a PR to translate a single dialog to English when the entire interface is in French. Sure, if an app is not fully translated and there's a lingering French string somewhere, submit a PR. But in this case, I don't see how this can be a serious suggestion.
- rhencke 6y agoIt was a serious suggestion. By working to understand and solve the problem that seems easy on its surface, either: 1. It ends up harder than it seems. The original poster gains a better understanding of what is preventing the originally proposed solution from working, and is in a better place to judge what needs changing, and generally everyone wins. 2. It ends up as easy as it seems. Not much time is spent, the original poster makes a valuable suggestion in the form of a patch/PR, and generally everyone wins.
- simonh 6y agoWhat does being MIT licensed have to do with it? And please, don't anyone dare chime in with the the standard "if people want a feature in open source they can 'simply' implement it themselves". UI technologies that don't include accessibility are simply not good enough. It's not like accessible options don't exist.
- zamadatix 6y ago> What does being MIT licensed have to do with it It's a non commercial non government project. > And please, don't anyone dare chime in with the the standard "if people want a feature in open source they can 'simply' implement it themselves". Already talked about it in the parent comment, would be interesting if you could respond to that instead of asking nobody mention it. > UI technologies that don't include accessibility are simply not good enough. Agreed, most software is not good enough. Especially beta versions of personal projects. > It's not like accessible options don't exist. It's not enough for something to exist it has to be pervasive and perfect to not be caught in a project task list for something like this. This point is the topic of conversation.
- simonh 6y ago>It's a non commercial non government project. Yes I know that, what's that got to do with not having accessibility? And no it doesn't have to be perfect, it comes down to what we consider acceptable.
- brabel 6y agoI am thankful to the author for not thinking like you, as if they did perhaps there would be no WASM Studio at all as they wouldn't have the time/knowledge/perseverance to continue writing the app far enough to be accessible and perfect for everyone. Luckily, they did the really hard work of getting something that's usable to at least a few of us! And it's been really useful to me as I am trying to write a language targeting WASM.
- zamadatix 6y ago> Yes I know that, what's that got to do with not having accessibility? Many (most?) will have different accessibility expectation for software from each of these categories, particularly since in many jurisdictions government and commercial have accessibility laws to follow or expectations on service because of payment/funding. In this case the question is what does accessibility have to do with the project not the other way around and the answer is "whatever people want to contribute to the project" not "what simonh finds acceptable of the project". > And no it doesn't have to be perfect, it comes down to what we consider acceptable. But you don't decide what's considered acceptable for someone else's freely available open source software they do. It's also not translated into every language and won't run well on every device. A very large portion of the world can't use it but it's just someone sharing what they've managed to make not someone saying everyone in the world will find the software acceptable or that they owe any functionality out of it to anyone else.
- folkhack 6y ago> Why assume ignorance/difficulty when the reality is not everyone is going to focus on adding/maintaining accessibility when they haven't even built out their beta MIT licensed side project? Yep as someone who's done a significant amount of front-end development ARIA and accessibility is more billable hours, more time involved into project, and more testing. When it's my own consulting I literally add it as a line-item to the bill and let customers take it off if they want to save cost, and when it's for professional work the only industry that has actual regulation around it is education/government. Truth is most companies are pushing the cost of development down however they can, and to cater to the accessibility market you're sinking significant dev/testing time into doing it right. Also, you can't blame me in a capitalist society for dropping this on the floor when my customer/employer wants me to... in most situations the hours invested into accessibility will never turn around into profit. The other problem is I do accessibility right. And most devs don't... I'll actually go through and do UIX experiences on-screen, then replicate it "blind" using a screen reader. This testing/tuning takes real time. Like - I can go through and do best practices with ARIA tags, well thought out HTML5, etc and still it's a total cluster once you actually use the application. It very much may not be "ignorance/difficult" - looking at what this dev has accomplished with this editor I'm going to give them the benefit of the doubt and say it was just extra time for a tiny fraction of their audience that they haven't invested yet. Harsh reality is they may not have that budget of time to go the extra steps for something as complex as this.
- danShumway 6y ago> I literally add it as a line-item to the bill and let customers take it off if they want to save cost, and when it's for professional work the only industry that has actual regulation around it is education/government. Take note, the takeaway from this comment is that if you're building a platform for applications and you want to make it accessible, it has to be required. You can't give engineers the choice or they won't do it. They will not prioritize equal access unless either the law or the technology literally forces them to. This kind of stuff is how you get regulated. This is also why I don't have a ton of sympathy for the people who want to get rid of HTML and use exclusively lower level APIs. They'll tell you they can replicate accessibility features, but they're not going to. They're going to open up the floodgate for interfaces that can't be used with a keyboard. Like, I'm not seriously suggesting this, but maybe divs in HTML shouldn't be clickable at all. Maybe you should be forced to use a button. Maybe the escape hatches that allow people to ignore semantic markup should go away. I want to live in a world where I can trust developers when they say that the web is for everyone and that equal access is important, and I want to trust them to make educated decisions about what is and isn't possible to make accessible for each project. But if we can't even get people to use buttons instead of divs, if even that turns into some kind of controversy... I don't know, maybe developers shouldn't get to make that choice, maybe the web should force you to use buttons. The whole point of the web is that it's a universal platform, as much as possible we should be striving to make it universally accessible. > The other problem is I do accessibility right We're not talking about something like adding professional captions to every single video you produce or making sure that there are shortcuts to quick-navigate through menus, we're talking about building buttons using the element named "button". Accessibility isn't binary, we don't have to decide to either do professional testing or to render everything to canvas. It really doesn't take firing up a screenreader to know that a clickable div with no aria roles is not accessible, you don't have to do advanced testing for that. I'm not going to jump on the shame train for the original author, not everyone knows this stuff and I don't blame the author for making a mistake. I don't expect every web developer to know everything, and shaming people over accidentally breaking accessibility isn't helpful for the cause. Instead we should focus on education and positive reinforcement. We don't want new developers to be scared of accessibility, we want them to feel like we're here to help. But outside of the original developer, I am absolutely going to jump on the shame train for everyone who's talking about very basic web accessibility features like they're some kind of complicated tradeoff. They're not. Using a button is not hard.