News for hackers. Stuff that matters.
Re:Annoying website features I face as a blind person by frereubu on Thursday September 10, 2020 @03:02AM (#24429679)
This is all good top-level stuff, but one thing I'd quibble with in this article is something that they don't say, except in the linked article about writing alt text - the vast majority of images are decorative, and those images should have an empty alt attribute. I see far too many images with pointless alt text because "you need to add alt text to all images". The easy way to think about this is to read the page as if the image alt text was part of the body copy. So if it goes like this:

"There are a number of different issues at play in universities at the moment. Stock photograph of students talking at a table. We spoke to the dean of the faculty of social sciences..."

You can see that this is pointless alt text. So the default should be no alt text unless there's some content in the image that is important for the context of the article.

I'm even dubious that photos that show something described in the article should have alt text, and I'd be interested to hear from blind and partially-sighted users what they think. For example:

"The dam burst on Saturday, inundating the local town. Photo of burst dam with rubble and uprooted trees at the side. The mayor said that they were lucky nobody was injured..."

Presumably if what the dam looked like after it burst was described in the article, that image shouldn't have alt text?

Re:Annoying website features I face as a blind person by Grumbledour on Thursday September 10, 2020 @03:24AM (#24429796)
I strongly disagree. Empty alt text means no image description. Think about that. You are blind. Your Screen reader tells you "image", nothing more.

How are you to know if this image is purely decorational or if the author just didn't include any alt text, like happens so often?

Also, don't think of the alt text as part of the surrounding text. Think of it as many browsers would display it, a box with a broken image icon with the alt text besides it. Would you not wonder what would have been displayed there if the image would work?

And do images that are just for decoration really need to be images? Can they not be for example background images in other elements? Like styling an hr element for a visual divider instead of using just a divider image?

But in any case, provide some alt text! If it just says "divider", "logo" or "decoration", that is still better than nothing for someone who can't see it at all.

Re:Annoying website features I face as a blind person by frereubu on Thursday September 10, 2020 @04:10AM (#24430027)
I think you might be talking about images that have no alt attribute at all. My understanding about present but empty alt tags is different:

https://www.w3.org/WAI/tutorials/images/decorative/

https://web.dev/image-alt/#how-to-add-alternative-text-to-im...

https://yoast.com/image-seo-alt-tag-and-title-tag-optimizati...

As far as I understand it, screen readers should skip over the image with an empty alt attribute because it's like a page in a document saying "page deliberately left blank". Unlike no alt attribute in which no intention can be inferred and which screen readers do read (as far as I know they read the URL), an empty alt attribute is deliberately saying "ignore this image". Not being blind or partially-sighted I'm not sure whether this is the case in all screen readers, or whether theory is different than practice.

Re:Annoying website features I face as a blind person by Grumbledour on Thursday September 10, 2020 @04:21AM (#24430086)
You are right. It seems screen readers these days do skip over images with empty alt tags.

I don't use one myself and have most of my knowledge from friends that do, but this info is obviously outdated.

Re:Annoying website features I face as a blind person by frereubu on Thursday September 10, 2020 @06:01AM (#24430686)
Rereading my comment I see that I only said "empty alt attribute" at the beginning and then started saying "no alt text", which is much more ambiguous and easy to misinterpret.
Re:Annoying website features I face as a blind person by xanthine on Friday September 11, 2020 @12:17AM (#24439148)
<rant> The thread till here is a perfect example of how discussions/debates should be like on the web. Someone expressed an opinion, someone else expressed an opposing opinion (misinterpreting the first opinion). Both opinions, if interpreted correctly, are valid, and the person who misinterpreted admitted it. Beyond that, (and note this) the author of the original opinion also apologized for being confusing in his statement of his opinion. Well done! </rant>
Re:Annoying website features I face as a blind person by 5Qn8mNbc2FNCiVV on Friday September 11, 2020 @09:37PM (#24449119)
That's more of a <appreciation>
Re:Annoying website features I face as a blind person by JimDabell on Thursday September 10, 2020 @04:31AM (#24430130)
There's no such thing as an alt tag, you're mixing up tags with attributes.

Screen readers have skipped over empty alt attributes for decades. I'm not certain they ever behaved differently, but if there were a time when empty alt attributes caused problems, it was back in the 90s. Best practice for purely decorative images has been to use empty alt attributes for 20+ years.

Re:Annoying website features I face as a blind person by bryanrasmussen on Thursday September 10, 2020 @05:20AM (#24430409)
>but if there were a time when empty alt attributes caused problems, it was back in the 90s.

Maybe my memory is off but I think up until the middle of the first decade of this century empty alt text was not good for screen readers, although maybe that was just because you always have to take into account older screen readers still in use.

Re:Annoying website features I face as a blind person by JimDabell on Friday September 11, 2020 @06:52AM (#24441275)
I was paying attention to this stuff by the turn of the century and best practice back then was the same as it is now. Screen readers have come a long way, but they could handle empty alt attributes correctly back then as well. I just checked, and the HTML 4 specification has been advising people to use empty alt attributes in this situation since 1997.

https://www.w3.org/TR/WD-html40-970708/struct/includes.html#...

Re:Annoying website features I face as a blind person by Grumbledour on Thursday September 10, 2020 @05:48AM (#24430602)
Yeah, I meant to write attribute of course.
Re:Annoying website features I face as a blind person by jscholes on Thursday September 10, 2020 @11:41AM (#24433345)
> But in any case, provide some alt text! If it just says "divider", "logo" or "decoration", that is still better than nothing for someone who can't see it at all.

This is a generalisation and one that many screen reader users wouldn't agree with. People who can only read through audio or braille are already facing certain disadvantages, such as not being able to quickly scan a piece of content in the same way visual readers can. Polluting the content with meaningless alternative text makes for an overly verbose user experience.

> Empty alt text means no image description. Think about that. You are blind. Your Screen reader tells you "image", nothing more.

This is factually incorrect. Using an empty string as the alt attribute on an image is the correct way to mark an image as decorative, and as such a screen reader user will never be informed about its presence. If the alt attribute is omitted entirely, that's when screen readers try to guess by announcing the filename and/or URL (or on iOS, actually trying to perform object recognition on its contents).

Re:Annoying website features I face as a blind person by hvdijk on Thursday September 10, 2020 @03:51AM (#24429918)
It should be that alt="" means the author specified that the image is purely decorational, missing alt means the author did not specify anything. Do screen readers really say "image" when presented with alt=""?
Re:Annoying website features I face as a blind person by Grumbledour on Thursday September 10, 2020 @04:18AM (#24430069)
They used to. But your comment made me search a bit and it seems most don't any more, you have to turn that on.

I guess you can then use alt="" for "decorational" images and practically hide them from screen readers? It still seems odd to me though to even have these kind of images.

Re:Annoying website features I face as a blind person by frereubu on Thursday September 10, 2020 @05:07AM (#24430311)
My view is that most images are decorational in the terms that we're talking about. You can view a photo of a burst dam, to take one of my examples, but a description of the scene should be in the article already, and therefore any further description is superfluous. The "should" in that sentence is doing a lot of work though - I don't think people consider this kind of stuff much at all, not on a deep level about why they're doing things. My first proper web job was in the BBC in the late 90s, and it was a really steep learning curve but has stood me in really good stead when considering this kind of stuff.
Re:Annoying website features I face as a blind person by Grumbledour on Thursday September 10, 2020 @05:55AM (#24430645)
I have trouble wrapping my head around this. When I think of decorational images, it's mostly back to times when we used spacers or built table layouts with sliced images. I drank the semantic cool aid. Decoration should be separate from content.

Of course a stock image in an article is not really important and may not add much value, but someone thought including it did add some at least. It just seems weird then to say that screen reader users should never even be made aware that it is there.

Obviously from all the comments, this seems to be what people do. Still, it seems somehow wrong to me. If the image sets tone, should we not try to convey that? If it really serves no purpose, should we not just leave it out at all?

Re:Annoying website features I face as a blind person by jscholes on Thursday September 10, 2020 @11:54AM (#24433475)
> Of course a stock image in an article is not really important and may not add much value

Not sure if anybody has mentioned this, but a super common case is that stock and other images (photos especially) require attribution. Working in the digital accessibility space, I see a huge number of examples of an image being marked as decorative (or worse, being implemented as a background image in the CSS) with an inline credit line. So as a screen reader user, I'm reading an article and keep spotting these notices all over the place, with no hint of what they accompany. In those cases, the image must have a description, even if it is thought that it doesn't add value.

Re:Annoying website features I face as a blind person by frereubu on Thursday September 10, 2020 @07:17AM (#24431155)
> back to times when we used spacers or built table layouts with sliced images

Haha! Someone of roughly my own vintage I see...

I get what you're saying, but perhaps if you think about it in terms of sensory modalities it might help. There are images which convey a feeling purely through its aesthetic that are ruined to the point of uselessness by plain description in written language, a bit like having to explain a joke: "You see, the expectation is that the chicken crossing the road is going to be for a funny reason, like a pun, or something, but having set up that expectation the fact that you've subverted the expectation makes it funny."

Another good example might be the story in this This American Life episode of the guy who sees a colour that is indescribable: https://www.thisamericanlife.org/577/something-only-i-can-se...

Better not to interrupt the reading flow just to let someone know there's something there, the purpose of which you can't really describe in any meaningful way.

Re:Annoying website features I face as a blind person by srtjstjsj on Thursday September 10, 2020 @09:32AM (#24432173)
The issue here is that despite screen readers, text is simply not the same as images.

Spamming a page with redundant visual imagery that's easy to take in at a glance is fine. But its terrible to screen read, because reading is much more expensive than glancing. For the alt text, it's important to only give valuable non-redundant information.

Re:Annoying website features I face as a blind person by miki123211 on Thursday September 10, 2020 @03:41PM (#24435789)
The only purpose for those images is eye candy, something to make the article "prettier" and prevent a wall of text from forming.
Re:Annoying website features I face as a blind person by matt_heimer on Thursday September 10, 2020 @03:09PM (#24435528)
Re:Annoying website features I face as a blind person by nsxwolf on Thursday September 10, 2020 @03:09PM (#24435529)
How do you know the alt text is an accurate description of the image?
Re:Annoying website features I face as a blind person by chmod775 on Thursday September 10, 2020 @03:50AM (#24429910)
> I strongly disagree. Empty alt text means no image description. Think about that. You are blind. Your Screen reader tells you "image", nothing more.

I feel like this is something where AI can actually shine: generating descriptions of images and video for blind people.

Best of all it's already a solved problem (and others have thought about it already): https://www.blog.google/outreach-initiatives/accessibility/g...

The next step is using AI to describe (important) changes to pages. Think of a chat on a website with new messages appearing. A voice saying: "Alice writes 'hello'" goes a long way. Thinking of it there really ought to be a way for JavaScript to interact with screen readers, allowing developers to give changes performed by JS something like an alt text.

The final step would be using AI to make interacting with sites easier. Finding the right button/element to click/focus can be really annoying with a screen reader. If you could just tell the AI "fill the form with X and Y and click submit", or "go to the next page", and possibly having that work even if what you're looking is buried in some context menu, pretty much any non-accessible page becomes accessible.

Re:Annoying website features I face as a blind person by JimDabell on Thursday September 10, 2020 @04:34AM (#24430151)
> I feel like this is something where AI can actually shine: generating descriptions of images and video for blind people.

That's exactly what you don't want in the majority of cases. The alt attribute is for an alternative to the image, not a description of the image. For decorative images, the alternative is the empty string, no matter what the image contains. "Laughing group of people" might be a correct description of a stock image, but completely wrong as alt text. For, e.g. a red arrow pointing out a required field, the alternative is "Required", not "Red arrow pointing right".

Re:Annoying website features I face as a blind person by armoredkitten on Thursday September 10, 2020 @12:11PM (#24433637)
I wouldn't consider generating descriptions a "solved problem". There has been progress with AI, but part of the issue is that image classifiers are trained to describe the objects in the image, but not necessarily the feeling or meaning of the image.

If you have Instagram, scroll through the alt text on the images some time. You'll see descriptions like "May contain: Person standing outside". That may be an accurate description of the picture, but it may be a poor substitute for what a sighted person sees -- someone showing off their new sweater, or posing in front of an interesting wall, or an aesthetic splash of colours. Of course, maybe someone who is fully blind doesn't care too much about a splash of colours, but the point is that describing an image is more than just about identifying the individual objects visible in the image. Because when we see a picture of an adorable puppy, we get more out of that image than just "dog sitting on floor". As of now, human-generated alt text is still the best solution in most cases, even if we are definitely making progress with AI. It's hard enough for humans to describe the aesthetics of an image, let alone a machine.

Re:Annoying website features I face as a blind person by goldcd on Thursday September 10, 2020 @05:23AM (#24430434)
I think it might already be there - I just right clicked in Chrome to see what options I could pull up for an image, and noticed a "Get image descriptions from Google" option
Re:Annoying website features I face as a blind person by miki123211 on Thursday September 10, 2020 @03:38PM (#24435753)
Blind person here, I definitely agree.

Decorational images aren't important, so use empty alt texts or aria hide them.

Most images should have short, to the point descriptions, containing the information you need to fully enjoy a given article. When writing a good alt description, think about why the image is there and why does it matter, not only about what it shows.

There could be two articles with the same image, but completely different alt descriptions. If your article is talking about how pretty graphs produced by a given tool are, describe what kinds of data the graphs contain and how they look like. For example, "A screen with three graphs, showing a company's stock prices across the last month, year and decade. There are points for the highest and lowest values marked on each graph. There are also average prices displayed". It doesn't matter what company it is, or what the actual values are. If your article talks about how tech companies did during the coronavirus pandemic, that same image would be described like "the stock price of x was $100 on march 20th, fell to $5 on march 21st, then slowly started rising, ending back at $95 on june 3rd". Same image, completely different information highlighted.

Sometimes you need very detailed and complete alt descriptions, particularly when you're describing diagrams showing complex relationships, function graphs and so on.No, "screenshot" is definitely not a good alt when you're trying to show what kind of output a given command is expected to produce. Yes, you should painstakingly retype the text (assuming you can't copypaste for some reason), or at least put it through OCR.

Re:Annoying website features I face as a blind person by kubanczyk on Thursday September 10, 2020 @03:49AM (#24429905)
> "Stock photograph of students talking at a table." You can see that this is pointless alt text.

No. The alt text is fine. It's the image that is pointless.

The problem is admittedly worse for the blind, but bothering to varied extent also some of the non-blind.

Re:Annoying website features I face as a blind person by jamil7 on Thursday September 10, 2020 @05:43AM (#24430574)
The way it's a standard feature on so many blog articles to lead with a big pointless unsplash image vaguely related to the content drives me crazy. What a waste of resources.
Re:Annoying website features I face as a blind person by jefftk on Thursday September 10, 2020 @08:10AM (#24431513)
The advice I've seen that recommends this is because articles with images are prioritized on social media, especially Facebook.
Re:Annoying website features I face as a blind person by jamil7 on Thursday September 10, 2020 @08:47AM (#24431779)
That figures, depressing though.
Re:Annoying website features I face as a blind person by Vrondi on Thursday September 10, 2020 @11:24AM (#24433185)
No, to sighted persons, decorative images are not pointless.
Re:Annoying website features I face as a blind person by detaro on Thursday September 10, 2020 @03:35AM (#24429848)
Photos, illustrations, ... basically always should have an alt-text. a) They are added for a reason for sighted users (e.g. to set atmosphere), a non-sighted user should be able to understand what is intended b) not all screen-reader users are entirely blind - they can see that there is an image and want to know what it is.

Divider lines etc done as images should have an empty alt-text to be skipped.

Re:Annoying website features I face as a blind person by frereubu on Thursday September 10, 2020 @04:14AM (#24430044)
Not sure I agree with your first point (I do think people add pointless images though, which muddies the water somewhat) but that's an interesting point about partially-sighted users that I hadn't considered before. There's clearly not a binary blind / not blind distinction in people. Thanks for pointing that out - I'll consider that in future.
Re:Annoying website features I face as a blind person by zachrose on Thursday September 10, 2020 @06:06AM (#24430710)
This post and the above comment prompted me to add alt text for an image on a landing page I’m working on.

Whether an image is decorative or not is a complex question that probably hinges on a lot of modernist ideology about the role of ornament[1].

A more functional approach is ask why the image is there. If it’s setting a mood, describe the image with words that evoke that mood.

In my case, the image was an illustration that I’d written off as not interesting to a blind person. But in putting forth the effort to “read” the image I realized it depicted our target demographic using our product in a fantasy setting, which is much more fun to describe than it appeared at first glance.

[1] https://en.m.wikipedia.org/wiki/Ornament_and_Crime

Re:Annoying website features I face as a blind person by frereubu on Thursday September 10, 2020 @01:19PM (#24434412)
I dunno. I sort of get where you're coming from, but I think "describing the image with words that evoke that mood" is a bit like explaining why a joke is funny.
Re:Annoying website features I face as a blind person by jscholes on Thursday September 10, 2020 @11:42AM (#24433361)
> "The dam burst on Saturday, inundating the local town. Photo of burst dam with rubble and uprooted trees at the side. The mayor said that they were lucky nobody was injured..."

In your example, the "rubble and uprooted trees" aren't mentioned in the surrounding text. So this image description, while a bit short and vague, does add something.

Re:Annoying website features I face as a blind person by boomlinde on Friday September 11, 2020 @09:35AM (#24442617)
Regarding the first example, even if the photo seems inconsequential to you, it's part of the narrative content of the article, perhaps to set a tone; it's an illustration, not simply decoration. Sighted and non-sighted users alike can use it to determine and judge the perspective and tone of the article, even if it doesn't have any other function.

I'd argue that if the image is useless to the narrative, it shouldn't be included at all, blind users or not. But in your example it does seem related to the narrative, and just as we can say that non-verbal cues are important to spoken communication, non-written cues are important to written communication.

Re:Annoying website features I face as a blind person by strogonoff on Thursday September 10, 2020 @03:28AM (#24429817)
It is unfortunate that nonexistent alt attribute is treated differently from empty alt attribute on images. I would prefer to add role="presentation" instead.
Re:Annoying website features I face as a blind person by jscholes on Thursday September 10, 2020 @12:03PM (#24433563)
> I would prefer to add role="presentation" instead.

This doesn't always do what you think it does. The presentation role is for negating any accessible role implied by the use of a particular HTML element, not for hiding it entirely. For example, you've used an unordered list for appearance/styling, but it only contains one child item. In those circumstances, a list of one thing is semantically meaningless and role="presentation" on the ul is completely appropriate.

The fact that applying the presentation to an img removes it from the page for screen reader users shouldn't be relied upon.

Re:Annoying website features I face as a blind person by strogonoff on Thursday September 10, 2020 @12:38PM (#24433926)
Decorative graphics is prime example use case in WAI-ARIA docs for the presentation role. Its purpose is to remove the element from the accessibility tree.

By comparison, alt="" is much less direct and obvious. I consider it an unfortunate historical quirk that it is not the same as a nonexistent alt attribute.

For decorative images I recommend using presentation role to make the intention clear.

Re:Annoying website features I face as a blind person by smoyer on Thursday September 10, 2020 @12:59PM (#24434186)
I was going to come here and ask about better alt-text until I read the linked page you referred to (https://bighack.org/how-to-write-better-alt-text-description...). I still have a question about a sight-impaired person's perception of what that image represents. Do you form an image in your head matching the text? Is this different for those who are blind from birth versus those that lost their sight after some time? Should the image be part of the "story" of the page or should the story stand on its own? And finally, for the case above where the image is decorative (as defined here: https://www.w3.org/WAI/tutorials/images/decorative/) would you prefer that the empty alt tag recommendation is used (and do screen readers recognize that semantic).
Re:Annoying website features I face as a blind person by frereubu on Thursday September 10, 2020 @01:10PM (#24434314)
If you look at most images in web pages, I'd argue that the vast majority are decorative or impossible to explain in a meaningful way. I've been building sites since the late 90s and I think this is probably a throwback to the times when we used to generate images with text in them, which doesn't really happen any more. Although there are probably cases where it's still relevant - I just can't think of any off the top of my head.

Edit: Perhaps a news story where the victim of a crime is in the foreground of an old photo and the person who committed the crime is in the background. But then that would be referenced in the text of the story, and the alt text would mention that reference.

Re:Annoying website features I face as a blind person by Vrondi on Thursday September 10, 2020 @11:21AM (#24433152)
What we need in web pages is a way to mark an image as purely decorative, as recent versions of MS Word have. When so marked, a screen-reader will skip that image as if it doesn't exist. This is a big improvement over the past reality of hearing "Image: decorative bracket" as a document is read. This is what HTML needs.
Re:Annoying website features I face as a blind person by jscholes on Thursday September 10, 2020 @11:58AM (#24433522)
> What we need in web pages is a way to mark an image as purely decorative

Setting the alt attribute to an empty string already accomplishes this task. If you find there are cases where it shouldn't, as well as reporting it as a bug to the appropriate browser and/or screen reader vendor, you can use aria-hidden="true" on the img. This is useful e.g. for inline SVGs which don't have an alt attribute.

Re:Annoying website features I face as a blind person by detaro on Thursday September 10, 2020 @11:22AM (#24433162)
That's what setting an empty alt text is supposed to do.
Re:Annoying website features I face as a blind person by Buttons840 on Thursday September 10, 2020 @02:52PM (#24435364)
What about people with very poor eyesight, who can see the shape of the website, but can't decern words or image details. They may want to know that the dark square they perceive is a picture of the burst dam.
Re:Annoying website features I face as a blind person by chrismorgan on Thursday September 10, 2020 @06:33AM (#24430891)
I started writing an article in March entitled “<img alt> should be empty”, arguing the radical position that every image tag should have an empty alt attribute. I don’t quite hold that opinion in reality, but it’s pretty close. I stopped writing it because I was poking a few too many holes in my position, but I still hold to the bones of it.

The primary categories of images that exist are:

• Decorative or ornamental imagery. Part of art direction; typically implemented with CSS (commonly background images) rather than <img> these days.

• Stock imagery. Part of art direction. An annoying waste of time, space and bandwidth that is unfortunately valuable because of human psychology.

• Meaningful figures: photos, diagrams and other images that are actually related to the content.

Art direction <img> tags should always have an empty alt attribute, even stock imagery: because it’s not adding anything to the content. (I hear someone crying, “but I put that stock image there for a reason!” Sure, you put it there to manipulate a particular facet of human psychology, but it’s purely a visual phenomenon, and it doesn’t transfer to other media at all. In fact, rendered to speech it’ll have the opposite effect, so drop it like a hot potato. There are equivalent phenomena for other senses, e.g. there’s a reason audiobooks, podcasts, &c. add music; but you can’t do that in this place.)

What remains, then, is the meaningful figures; and for that, I hold that images should basically always be described in the visible text anyway, typically as a <figure> with a <figcaption>. And if you have a <figcaption> describing the image sufficiently, I see no cause for any image tag to have anything but empty alt text, because you shouldn’t be writing the same thing again, and there’s no other useful value. Some decry this, and insist figcaption and alt serve different purposes and you should have both, e.g. https://www.scottohara.me/blog/2019/01/21/how-do-you-figure...., part of an article which another decent resource https://webaim.org/techniques/alttext/#figure cites, but I disagree with the argument and its conclusions—especially its “if you empty the alt then the figcaption is not describing anything”, because the figcaption was never describing the image in the first place, but rather the figure, which is still there. Hiding the image in this way because it has been fully described is thus perfectly reasonable.

(Related: avatar images that are paired with the user name in text should have empty alt text. Otherwise you get the name twice in a row. In this case, the image is effectively ornamental, just like icons on buttons that also have labels are ornamental. I receive emails from multiple systems and interact with multiple web apps that commit this sin. It’s annoying, especially when they style things in such a way that the visual presentation of alt text when the image is not loaded is broken anyway.)

So the main case that people might think is left is diagrams where a figcaption would say “the results of such-and-such a benchmark” or similar. But even then the alt text should quite probably be empty: remember also that alt text shouldn’t be too long; the picture may be worth a thousand words, but alt text should not be even a tenth of that length, so you probably shouldn’t list all the values of a bar chart in alt text. Rather, any details that matter, draw attention to them in the caption or the prose surrounding the image! Also most diagrams would be better done as SVG, and if you do that you have much finer control over accessibility presentation than alt text, as well. Though you still have to be careful about pushing too much information to the screen reader.

To be clear, I’m not saying that everyone should take their documents and document.querySelectorAll('img').forEach(e => e.alt = ''), but rather that they should strongly consider designing their documents and massaging their content to the point where that is reasonable, with writing good captions and the likes.

Re:Annoying website features I face as a blind person by jscholes on Thursday September 10, 2020 @12:07PM (#24433606)
> Hiding the image in this way because it has been fully described is thus perfectly reasonable.

I disagree as a screen reader user. To be clear, I completely support your assertions around describing complex imagery, e.g. the alt text is a completely inappropriate place to describe a graph, chart, etc. But a figcaption with no accompanying figure content is semantically wrong. If you have a figure with a textual description or semantic representation of the data displayed in an image, e.g. a table behind a disclosure button, then fine: the figure body is meaningful, as is the caption. But if I'm testing a site and find cases of figures where the only screen-reader-accessible element is the figcaption, that is an antipattern that I will insist be addressed.

Re:Annoying website features I face as a blind person by chrismorgan on Thursday September 10, 2020 @01:22PM (#24434446)
OK, thanks—checking it with real users is the main thing I still wanted to do with this, and I was hoping someone in the know would respond! (I was going to have to find someone to ask if I went ahead with the mentioned article, definitely couldn’t publish without that.) But my problem is this: I see no reasonable value for the alt text; every option available to me is claimed to be wrong for at least one reason: you shouldn’t duplicate the figcaption, and you shouldn’t omit alt, and you shouldn’t have a blank alt, and you shouldn’t just say “photo” or even “the photo described by the caption”, so… what’s left? I can think of no other reasonable alternatives. So blank alt was feeling the least bad to me.

What would you do? For a concrete case, let’s say you have a bar chart in a <figure> with the figcaption “Figure 3: results of Benchmark Q, showing X to be 40% faster than Y.” What alt attribute would you give the <img src=benchmark-results.svg>?

Re:Annoying website features I face as a blind person by PeterisP on Thursday September 10, 2020 @04:05PM (#24436018)
I'd argue that the figcaption can't contain an adequate description in pretty much every case. "Figure 3: results of Benchmark Q, showing X to be 40% faster than Y." is appropriate only for the minimalistic bar chart with only two bars, and already there it's pushing the limits - it would often be appropriate to just say "Figure 3: speed of X and Y in benchmark Q" as the interpretation and conclusions from the two bars is a separate, different thing which could be in the text. Perhaps to the reader it's not relevant that X is 40% faster than Y, but rather that X can do the thing in 5.6 seconds - which is clear from the bar chart, but not from that proposed figcaption.

Let's imagine a more realistic bar chart with the results of benchmark Q, showing the speed difference of X and Y in four different [resolutions/tasks/memory limits/processors/whatever], so 4x2 bars. Should the advantage of X over Y and all the other patterns visible in the chart be described in the figtext? IMHO not. In such a case, a reasonable alternative for that content would be not a sentence but a data table, providing all the information but leaving the interpretation up to the reader - just as for the visual chart.

Re:Annoying website features I face as a blind person by jscholes on Thursday September 10, 2020 @04:33PM (#24436302)
> I'd argue that the figcaption can't contain an adequate description in pretty much every case.

Completely agree with this (and your other comments re: interpretation). In the real world, it's rare for content and data to be as simplistic as the example described here, and presenting it in an inclusive fashion which allows all users to make their own conclusions is the key.

Re:Annoying website features I face as a blind person by chrismorgan on Thursday September 10, 2020 @04:15PM (#24436131)
This style of caption I’m describing is regularly only very broadly describing the figure and picking what the author thinks is the most relevant detail. It’s typically not describing everything—nor would alt text, because that’s too long for alt text, which needs to be fairly short.
Re:Annoying website features I face as a blind person by jscholes on Thursday September 10, 2020 @01:55PM (#24434816)
> For a concrete case, let’s say you have a bar chart in a <figure> with the figcaption “Figure 3: results of Benchmark Q, showing X to be 40% faster than Y.” What alt attribute would you give the <img src=benchmark-results.svg>?

In this case, the bar chart most likely should be accompanied by an accessible textual alternative. For example, a link to a textual version/download of the results, a disclosure button you can hit to view a textual description, a table, whatever. If that is included, the img itself can be marked decorative, because the figure contains an accessible body element as well as the caption. For me, that would most likely be enough to pass my semantic and accessibility requirements.

On the other hand, if you're not going to provide that or feel that the caption already sufficiently describes the data, you could provide a straight visual description of the image for the img's alt. For example, which data is shown on which axis? Not all screen reader users will find that helpful, but there are two things to keep in mind:

1. If a screen reader user moves into the figure with certain keystrokes, the text of the figcaption will be announced as the figure's accessible name or description. So the presence of alt text need not in any way block them from getting to the data.

2. Are you catering for all possible screen-reader-using audiences? Okay, if I'm reading an article about the benchmarks between two databases or something on a blog, it's more personal/for work and I just want the data. But what if I'm in a classroom setting and need to tell my students how to read this chart? If I don't know anything about the layout of the data, I can't do it.

Re:Annoying website features I face as a blind person by chrismorgan on Thursday September 10, 2020 @04:12PM (#24436088)
But I’m going to put that link to the full diagram in the figcaption, because I want it to be there for sighted users also. Now what?

A straight visual description of the diagram is probably inappropriate for alt text: too long, too wordy; it’s the longdesc problem again.

I’m not convinced that there is a properly correct solution here.

Re:Annoying website features I face as a blind person by jscholes on Thursday September 10, 2020 @04:31PM (#24436283)
> But I’m going to put that link to the full diagram in the figcaption, because I want it to be there for sighted users also. Now what?

We're now entering the realm of what represents a caption and what doesn't. Given my earlier point that the figcaption text is mapped as the accessible name or description for screen reader users, interactive elements inside the caption should be avoided because they don't make sense when spoken inside a flattened, plain text string. So to answer the specific question, "now what?" Don't put the link inside the figcaption, put it inside the <figure> as a sibling of the image (or inside a container which is a sibling of the image).

To look at it another way: I might be inclined to say that caption text should make sense when presented with the accompanying image in a non-web context (e.g. a printout). This is why captions are often used for credit lines, attribution info, etc.

> I’m not convinced that there is a properly correct solution here.

Without a more specific use case, it's difficult to make a recommendation. However, I will say one thing that I've found to be universally true: the power of the image description is often underrated. I've had many conversations with designers, developers, content editors et al, where the assertion has been made that there's not much to describe in a particular image. And then as a blind user, I have multiple questions about what it shows, the answers to which can make it into the descriptive text.

This is often a lightbulb moment for many, as they realise that actually, all those details I asked about were subconsciously filled in/processed, and they just didn't think about them. Data is the same.

Re:Annoying website features I face as a blind person by srtjstjsj on Thursday September 10, 2020 @09:45AM (#24432287)
> basically always be described in the visible text anyway,

Is a bridge too far. Sure you should summarize the key takeway of a chart, but a chart has a lot of detail that sighted users don't need to reread in a worse layout, but blind users need a way to access.

Re:Annoying website features I face as a blind person by chrismorgan on Thursday September 10, 2020 @11:42AM (#24433368)
I think we’re in agreement, just that you understood what I wrote a bit differently from how I intended. By “described in the visible text” I didn’t mean “expounded at length”. I’m talking most commonly about the sort of captions newspapers printed with images, typically 5–30 words; but also about things in the text that refer to the figure, like “here are the benchmark results:” and “we see that X is 57% faster than Y”.

There’s no good way of exposing lengthy information about a chart to screen readers. Don’t try doing it via alt, it’s a bad experience; and don’t try doing it by screen-reader-only text, that just gets confusing. The longdesc attribute was an attempt to do this, but it failed to gain traction among users or assistance tech. Consensus now is that you should instead include in the caption a link to a page that focuses just on the chart, which can then include more detail for the screen readers.

Re:Annoying website features I face as a blind person by felixfbecker on Thursday September 10, 2020 @11:37AM (#24433306)
I think ideally those charts would be SVGs that can have elements with their own ARIA labels and be navigated by a screen reader. It would be very clumsy to describe an entire chart in an alt text string.
Re:Annoying website features I face as a blind person by dmitriid on Thursday September 10, 2020 @03:59AM (#24429966)
It should be aria-hidden=true then, not alt=""
Re:Annoying website features I face as a blind person by mweberxyz on Thursday September 10, 2020 @11:04AM (#24432986)
Or potentially aria-role="presentation"

aria-hidden="true" will make the element completely invisible to the screen reader software, whereas setting aria-role will tell the screen reader "hey there is something here but it's job is purely aesthetic", and then the screen reader can determine what it wants to do with it.

Re:Annoying website features I face as a blind person by jscholes on Thursday September 10, 2020 @12:12PM (#24433656)
> Or potentially aria-role="presentation"

There is no such attribute as "aria-role", only the single word "role".

> aria-hidden="true" will make the element completely invisible to the screen reader software, whereas setting role will tell the screen reader "hey there is something here but it's job is purely aesthetic", and then the screen reader can determine what it wants to do with it.

This is accurate, but you should also ask yourself about design intent if you have the knowledge to do so (or can consult with someone who does). If you have decided that something should be hidden from a screen reader user, and have verified that your intentions are correct, aria-hidden is the way to go. Many accessibility bugs are caused by people using something like role="presentation" because they wanted to leave it up to the browser and/or screen reader to make a decision. The problem is, those software decisions are often wrong and inconsistent, leading to support requests and hard-to-track-down bugs.

Note: the above applies across the board, not just to images. The correct way to mark an image as decorative is via alt="" on the img, and you should be careful applying aria-hidden to anything as it can be extremely destructive. No ARIA is better than bad ARIA.

Re:Annoying website features I face as a blind person by chrismorgan on Thursday September 10, 2020 @01:41PM (#24434677)
I wouldn’t describe role=presentation like that. Rather, it says “ignore what you know about what this element should be, pretend it doesn’t exist and only consider its children”. Technically, that is “replace this node in the accessibility tree with its children”. And then in the case of <img> specifically, it doesn’t have any children, so the effect is removing the entire thing from the accessibility tree, same as an empty alt attribute or aria-hidden=true.

Specifically I’m finding fault with “the screen reader can determine what it wants to do with it”. This isn’t true because the screen reader will never see the image, because the browser removed it from the accessibility tree.

But yeah, https://www.w3.org/TR/wai-aria-practices/#presentation_role lists this as the first of three common uses of role=presentation:

> Hiding a decorative image; it is equivalent to giving the image null alt text.

But still I echo how jscholes ends, and how the WAI-ARIA Authoring Practices document starts: No ARIA is better than Bad ARIA. Be careful what you do if you’re straying from the beaten track, and test things out. In view of this, I will confirm that I have not tested anything that I have said in this comment in order to verify it, though I believe that my mental model of how the accessibility tree and the mentioned details works is accurate.

Re:Annoying website features I face as a blind person by globular-toast on Thursday September 10, 2020 @04:34AM (#24430147)
Decorative images should be in your style sheet, not the html document. I know this purity isn't always possible with every design, but if you care about blind readers you'll change your design, I guess.
Re:Annoying website features I face as a blind person by darekkay on Thursday September 10, 2020 @02:14PM (#24435002)
> Decorative images should be in your style sheet, not the html document.

Similar to the discussion around functional CSS [1], HTML vs. CSS is a separation of technologies, not a separation of concerns. Neither approach is _wrong_, they just come with different trade-offs.

[1] https://adamwathan.me/css-utility-classes-and-separation-of-...

Re:Annoying website features I face as a blind person by srtjstjsj on Thursday September 10, 2020 @09:42AM (#24432260)
Huh? Decoration is for humans and doesn't fit the robotic split of content vs presentation.
Re:Annoying website features I face as a blind person by globular-toast on Thursday September 10, 2020 @01:29PM (#24434549)
Yes? The whole style sheet is for humans. Specifically, sighted humans. Blind users have no use for any of that.
Re:Annoying website features I face as a blind person by amelius on Thursday September 10, 2020 @03:23AM (#24429792)
But shouldn't there be software that treats the entire page as an image, and from there reconstruct what parts are important?

Web design practices are far too unpredictable, and you can't rely on them to extract semantics.