-
Notifications
You must be signed in to change notification settings - Fork 29
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
New: support for responsive menu item image sources (fixes #198) #200
Conversation
- set alt text as 'null' to prevent aria-label being applied to img. Maintain alt text reading in the menu item details instead.
this only needs setting if different to classNamePrefixes
- attribution not currently supported in existing Boxmenu - the reading order would render attribution before menu item title and image alt text which isn't logical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
Not sure if it's worth mentioning but this development is only available to the Framework at present until a core |
Thanks @guywillis. That's right and it's the same case for all other plugins that also use the image template. I'll update the PR message to note this. Plugin README, example.json and schemas only include the image sources they were initially developed to support although they all support the full device range within the FW. For example, GMCQ supports |
We'd want to implement a consistent approach globally but is outside the scope of this PR. One to bring to the weekly stand up. |
Just FYI I've raised an issue for this adaptlearning/adapt-contrib-core#563 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
🎉 This PR is included in version 7.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Fixes #198
Update
New
small
,medium
,large
andxlarge
.small
andlarge
images are defined, images switch fromsmall
tolarge
atmedium
(for separate mobile and desktop images).Note, this development is only available to the Framework at present until a core contentobject.model.schema file is updated to offer up the flexibility to the AAT. This is also the case for all other plugins that use the image template.
Testing
Please test the following use cases. All code snippets reference pre-bundled course images.
Dependencies
Now that
.boxmenu-item__image-container
is a<span>
(not<div>
), Vanillamargin-bottom
is no longer supported (inline elements only support horizontal margins). Instead, I'd suggest applying themargin
to.boxmenu-item__details
as per below. See Vanilla issue adaptlearning/adapt-contrib-vanilla#520