Skip to content

Conversation

@drizco
Copy link

@drizco drizco commented Oct 17, 2025

This pull request updates the handling of expandable images to improve accessibility and data consistency. The main change is the addition of a dataAlt attribute, which stores the cleaned alt text without the "expandable" suffix, both in the image processing logic and in the schema.

Expandable image improvements:

  • Updated expandableImages logic in src/expandableImages.js to extract and store the alt text without the "expandable" suffix in a new dataAlt property, and to use this cleaned text as the visible value.

Schema updates:

  • Modified the schema in utils.js to allow the new dataAlt attribute on span elements representing expandable images.

main repo pr: code-dot-org/code-dot-org#68933

Copy link

@hannahbergam hannahbergam left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@bethanyaconnor bethanyaconnor left a comment

Choose a reason for hiding this comment

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

Is it possible to add a test for this? I don't see an obvious test file for this feature but this repo does have testing set up and it would be good to add. Sorry for adding more work :/

@bethanyaconnor bethanyaconnor requested a review from Hamms October 22, 2025 21:22
@drizco
Copy link
Author

drizco commented Oct 23, 2025

Is it possible to add a test for this? I don't see an obvious test file for this feature but this repo does have testing set up and it would be good to add. Sorry for adding more work :/

of course, will do!

@drizco drizco requested a review from bethanyaconnor October 23, 2025 16:19
@drizco
Copy link
Author

drizco commented Oct 27, 2025

@mgc1194 @stephenliang @Hamms does anyone know if I need to do a version bump here and update the main repo's package json to pull in this change?

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.

3 participants