News for hackers. Stuff that matters.
Re:Falsehoods programmers believe about undefined behavior by chrismorgan on Monday November 28, 2022 @07:28AM (#33772774)
> Here's the list of guarantees compilers make about the outcomes of undefined behavior:

> That's the whole list. No, I didn't forget any items. Yes, seriously.

I’m a little disappointed there isn’t an empty <ol> or <ul> in the middle there. I imagine screen readers would announce something like “list, zero items”.

Re:Falsehoods programmers believe about undefined behavior by obi1kenobi on Monday November 28, 2022 @10:55AM (#33775153)
Post author here. I'm very curious about the screen reader idea. If you or someone else is able to confirm what a good screen reader might do currently / what it might do with an empty list element, I'll happily update the post to whatever is the better behavior.

I wish there were a best practices doc + a matching linter for accessibility things like this.

Re:Falsehoods programmers believe about undefined behavior by seanwilson on Monday November 28, 2022 @11:29AM (#33775646)
I just tested "<ol></ol>" in VoiceOver on Mac and nothing gets read. Different screen readers are notoriously inconsistent though.

> I wish there were a best practices doc + a matching linter for accessibility things like this.

For what it's worth, this sounds like it would have been a fun tweak for screen readers but it's accessible without.

The best way to get more of a feel for this is to try a popular screen reader for your OS, do the tutorial, and try it on the page yourself. It's not practical to automate a lot of accessibility checks like this one because it depends on context and there's subjectivity to it, similar to visual design and text readability.

Re:Falsehoods programmers believe about undefined behavior by radicalism on Tuesday November 29, 2022 @05:25AM (#33785798)
> Different screen readers are notoriously inconsistent though.

In other words, UB!

Re:Falsehoods programmers believe about undefined behavior by grogers on Tuesday November 29, 2022 @07:10AM (#33786541)
Implementation defined