Skip to content

Conversation

@gormus
Copy link
Owner

@gormus gormus commented Nov 13, 2025

looks like I missed an essential part last time discourse#77

According to MDN:

Any set of content that should be consumed as a single image (which could include images, video, audio, code snippets, emojis, or other content) can be identified using role="img".

You shouldn't count on the alt text of individual images for conveying context to assistive technologies; most screen readers will consider the element with role="img" set on it to be like a black box, and not access the individual elements inside it. Therefore, provide a comprehensive overall descriptive alt text for image, either in the surrounding text, or by using an aria-label attribute, with alt attributes for search engines or sighted users to be written to the page should an image fail.

source: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/img_role

@gormus gormus marked this pull request as ready for review November 13, 2025 20:23
@gormus gormus merged commit f597f3e into main Nov 13, 2025
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