Skip to content

HTML writer: emit empty alt tag in figures - #5518

Merged
jgm merged 1 commit into
jgm:masterfrom
mb21:figure-alt
May 28, 2019
Merged

jgm merged 1 commit into
jgm:masterfrom
mb21:figure-alt

Conversation

@mb21

@mb21 mb21 commented May 22, 2019 •

Copy link
Copy Markdown
Collaborator

The same alt text is already in the <figcaption> and screen-readers would read it twice, see #4737

Note: Image attr [] (s,tit) wouldn't work, since this would emit no alt tag which is invalid HTML.

The same text is already in the <figcaption> and
screen-readers would read it twice, see jgm#4737
@jgm

jgm commented May 28, 2019

Copy link
Copy Markdown
Owner

My only concern about this is that some accessibility validation software might complain about the missing alt tag. (I'm not sure about this, though.) I agree that this would improve usability with screen readers. I also agree that ultimately we need to separate alt and caption. (That's the issue for adding a proper figure type.)

@mb21

mb21 commented May 28, 2019

Copy link
Copy Markdown
Collaborator Author

My only concern about this is that some accessibility validation software might complain about the missing alt tag.

That's why it emits an empty alt tag alt=""... see e.g. https://davidwalsh.name/accessibility-tip-empty-alt-attributes

@jgm
jgm merged commit 3f57f49 into jgm:master May 28, 2019
@jgm

jgm commented May 28, 2019

Copy link
Copy Markdown
Owner

OK, thanks.

@mb21
mb21 deleted the figure-alt branch May 28, 2019 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants