-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Gallery block markup in the front-end #2900
Comments
See #1450
Yes, galleries have one of the biggest departures, and I think that's alright :) The new ones have a different presentation and approach, and we can consider them separate blocks. We'll have the ability to convert old ones to the new ones if desired (on demand).
Are these supposed to be saved with the markup or filtered like |
Not sure, I need to check this. |
Then, since changing markup from the old one is OK, I'd suggest to improve it further. A gallery of images is basically a list of images. Wrapping the gallery images in a list would be semantically correct: a list is a list and should be marked up as such. Additionally, this would allow assistive technologies to announce the number of items in the list, helping users decide if they want to go through the list or skip it. |
@afercia Silently inside my head I was thinking about list too. Could we just use minimum of elements like this: <ul class="wp-block-gallery alignnone columns-3 is-cropped">
<li><figure class="blocks-gallery-image"><img src="http://wordpress-svn/src/wp-content/uploads/2017/03/espresso-2.jpg" alt="Alt text" data-id="28"></figure></li>
<li><figure class="blocks-gallery-image"><img src="http://wordpress-svn/src/wp-content/uploads/2017/03/coffee-2.jpg" alt="" data-id="30"></figure></li>
<li><figure class="blocks-gallery-image"><img src="http://wordpress-svn/src/wp-content/uploads/2017/03/sandwich-2.jpg" alt="" data-id="29"></figure></li>
<li><figure class="blocks-gallery-image"><img src="http://wordpress-svn/src/wp-content/uploads/2013/03/unicorn-wallpaper.jpg" alt="Unicorn Wallpaper" data-id="1045"></figure></li>
</ul> |
@samikeijonen minimum is nice. 🙂 |
Was looking for filters to add srcset |
Fixed in #3441. |
Add scrset please:) |
Gutenberg markup:
Old markup:
srcset="stuff" sizes="stuff"
is missing anyways.Conclusion and proposal
aria-describedby
should be used in the Gutenberg also.srcset
and any responsive images related stuff just like the old editor.The text was updated successfully, but these errors were encountered: