Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alt text to images #3762

Merged
merged 3 commits into from
Apr 16, 2024
Merged

Add alt text to images #3762

merged 3 commits into from
Apr 16, 2024

Conversation

fstrr
Copy link
Contributor

@fstrr fstrr commented Mar 26, 2024

Eight images in WCAG 2.2 were missing alt attributes. This PR adds those in.

Ref: #1139

Copy link
Member

@scottaohara scottaohara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pending the remnant figcaption which is no longer needed, since the parent was changed to a div, this otherwise looks good!

techniques/general/G167.html Outdated Show resolved Hide resolved
Co-authored-by: Scott O'Hara <scottaohara@users.noreply.github.com>
@fstrr
Copy link
Contributor Author

fstrr commented Mar 27, 2024

pending the remnant figcaption which is no longer needed, since the parent was changed to a div, this otherwise looks good!

Good catch. I thought I'd caught all of those. Thanks.

@mbgower
Copy link
Contributor

mbgower commented Apr 4, 2024

I opened an html-aam issue on how figcaption should be able to serve as alt text a few years ago. IMO, this PR is a clear example of why that made sense. For many of the changes in this PR, the figcaption is being removed and instead its string is being used verbatim as the alt string.
Reason? Because despite the clear programmatic association between the image and figcaption, the accname doesn't recognize it as part of the formula.

Result: screen reader users receive the identical string of information that ALL users could have received. While I am in no way saying that the string should be unavailable to screen reader users, it's difficult to argue that depriving all sighted users of what was considered a useful string of information is an improved outcome.

I also think this re-use of the caption string as the ALT string serves as a perfect example of how the text of a figcaption and alt need not materially be different at all: #852 (comment)

# Conflicts:
#	techniques/general/G162.html
#	techniques/general/G167.html
#	techniques/general/G56.html
@mbgower mbgower merged commit 2e4b634 into main Apr 16, 2024
1 check passed
@mbgower mbgower deleted the add-missing-alt-text branch April 16, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants