After looking at a few embeds yesterday, I thought the changes I propose in this PR might improve the screen reader experience. They are:
make the default aria-role an img rather than a figure (as a reminder a figure will let you access all of the text inside the graphic, and more often than not it's better to treat it as a flat img, though users can change that if they'd like.
add an id to our visually hidden text, and use that to give the same element with the role a description - right now if folks use aria-role="img", they won't actually get to the visually hidden text. this approach will also make it more discoverable when folks click on the graphic area with their mouse while using a screen reader
Hi Matt,
After looking at a few embeds yesterday, I thought the changes I propose in this PR might improve the screen reader experience. They are:
img
rather than afigure
(as a reminder a figure will let you access all of the text inside the graphic, and more often than not it's better to treat it as a flat img, though users can change that if they'd like.id
to our visually hidden text, and use that to give the same element with therole
a description - right now if folks usearia-role="img"
, they won't actually get to the visually hidden text. this approach will also make it more discoverable when folks click on the graphic area with their mouse while using a screen reader