Live data from Hacker News

The easiest way to keep your web apps accessible: Just use text

blog.logrocket.com

151–160 of 271 posts

Re: The easiest way to keep your web apps accessible: Just use text

#151
post #109

Earlier quoted context omitted.

I've never seen a setup where a css preprocessor didn't just generate the output once at build-time.

Oh, people can abuse anything. Maybe they want their CSS all in-line at the top of the dynamic HTML. So they run the preprocessor during page generation on the server. Use a separate CSS via link tag? Oh no, I heard that was slow. Set expires cache header for 1 day? Oh no, that makes testing hard for me and what if the CSS changes? Web developers sometimes use the dumbest reasons to avoid doing good things.

CSS generated in the server still means it’s not pegging user CPU for 50ms like they said.

I think these meandering rants are a tad silly.

Re: The easiest way to keep your web apps accessible: Just use text

#152
post #60

Earlier quoted context omitted.

Breaking it is completely unnecessary too, even with single page apps. It's not all that hard to build a React or Angular apps that use proper links along with the browser history API. Designed properly, the apps should be able to load their state and render correctly even when deep-linked to somewhere other than the app's top level. This isn't a new concern - I remember paying attention to this back in the old days…

It's such an extremely simple litmus test: if it breaks the back button of the browser, it's the wrong design. The closest thing to an exception being cases where one needs to be logged in to see a page, or when links are consciously invalidated for some other reason. And even then the website/webapp should still just signal this to the user without a bazillion redirects.

> if it breaks the back button of the browser

Good luck getting a group of people to agree on what "non-broken" back button behavior is.

Re: The easiest way to keep your web apps accessible: Just use text

#153
post #133
post #127

Earlier quoted context omitted.

Works in all browsers, maybe, but certainly not all screen sizes. On my 1080p 5" nexus 5x, opening the page leaves me with unreadably small text. If I zoom in, the text doesn't reflow. So now I need to bounce scrolling around from side to side to read a line of text. I suspect if I performed the same test in my 1440p 27" monitor, I'd have a surprisingly similar problem, of overly small text in a small box in the cent…

Ha! I should have said the technique works. I'd obviously want to lay things out a little smaller on phone screens. Though, for that particular use, is just punt and say not supported on smaller screens. Note, I couldn't just do an image because of the animation nonsense I was playing with. Edit: though, oddly, I think you are really complaining about some of the styling I inherited from org. I can possibly fix that…

Sure, max-width will restore reflow, but now your code listings and images break out of their container: https://i.imgur.com/utCVxg1.png

My point is that absolute positioning/pixel perfect designs are easy because they solve a simplified project "How to have my content look correct at a fixed size". But it breaks down once that fixed size is no longer reasonable for the target device.

Re: The easiest way to keep your web apps accessible: Just use text

#154

Earlier quoted context omitted.

Well, it's a problem of mixing data and visual elements. In a good model of the web, html is your data, css is your styling, and javascript doesn't really exist. In another model of the web, your data would be your data, html/css would work together to form a scene-graph. Javascript defines the relationship between your data and it's scene graph. That friction, are we using html as data or as part of our scene-graph,…

Thanks for introducing me to the concept of the scene-graph. I tried to make an argument on a React community slack that components are purely visual, that they should express the visual structure of the web page, in the context of an argument over how state and props should be used. He hated the rise of the Redux ecosystem, and I was trying to make the point that if you don't manage global state in your application…

[deleted]

Re: The easiest way to keep your web apps accessible: Just use text

#155

Ironically, this article was posted on Medium, whose apps are notoriously inaccessible. Despite being a reading-focused app, it does not let you change the text size or spacing in any way. And on iOS, it also ignores the user's systemwide dynamic text setting.

Why does Medium need an app in the first place? Is a web browser not a good enough app for reading content on the internet?

Re: The easiest way to keep your web apps accessible: Just use text

#156
post #147
post #104

Earlier quoted context omitted.

I recall reading a story about someone who had implemented some sort of table using links for actions. At some point the app data mysteriously got wiped out. Turned out a user had Alexa toolbar installed and it crawled the "delete" links on each row (as well as all the pagination links)...

This is what happens when you use a HTTP GET to perform an "unsafe" action. HTTP GET links should always be safe to crawl... Always... It's in the spec for a reason. Seen people make mistakes like this before... Even using a POST when it should be a GET can cause funny behavior. Funny, but not dangerous behavior like using GET instead of POST. Whenever I bring a new web dev aboard this is my first lesson to them, and…

Truth.

Also, junior devs don't use HTTP error codes and it always ends up biting them at some point. A 200 response with a body that says "server error" isn't going to bubble up through your JS properly.

Re: The easiest way to keep your web apps accessible: Just use text

#159
post #136

Earlier quoted context omitted.

My guess is somebody over-engineered a "make anything into a link" helper function and then decided it was easier to just use it everywhere, rather than preferring tags in the 90% of cases where it would make more sense. How do screen readers handle these script-based links? I don't mind it from a "I have working eyes and arms" perspective, but I imagine it's kind of a pain for assisted vision?

I think some of it is possibly just ignorance, too. For example, I've worked with a fair bit of code full of ` ` tags, where the click handler basically invoked the router and redirected to a new page. Seems to happen a lot in React/JSX code.

There is a special place in hell for whoever does this...

I guess it might just bother me so much because it shows a fundamental misunderstanding of how the web works.

Re: The easiest way to keep your web apps accessible: Just use text

#160
post #155

Ironically, this article was posted on Medium, whose apps are notoriously inaccessible. Despite being a reading-focused app, it does not let you change the text size or spacing in any way. And on iOS, it also ignores the user's systemwide dynamic text setting.

Why does Medium need an app in the first place? Is a web browser not a good enough app for reading content on the internet?

[deleted]
Post reply on HN