Skip to content
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

Make the Gallery block not use <ul> tags #12509

Closed
STHLMWebDesign opened this issue Dec 1, 2018 · 2 comments
Closed

Make the Gallery block not use <ul> tags #12509

STHLMWebDesign opened this issue Dec 1, 2018 · 2 comments
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images Needs Accessibility Feedback Need input from accessibility Needs Design Feedback Needs general design feedback.

Comments

@STHLMWebDesign
Copy link

Does the gallery block have to use <ul> and <li> elements? It's not correct, a picture gallery is not an unordered list. Plus it creates possible styling conflicts. Gutenberg styles actual unordered lists without any CSS classes. So there is a likely scenario where theme author could style unordered lists by target the parent post container .post-content ul in that case this CSS styling risks being passed along to ul.wp-block-gallery

I suppose a quick fix would be to make Gutenberg apply a CSS class to both unordered and ordered lists for theme authors to target, but I still have to point out that an image gallery is not an unordered list.

@swissspidy swissspidy added Needs Design Feedback Needs general design feedback. Needs Accessibility Feedback Need input from accessibility [Block] Gallery Affects the Gallery Block - used to display groups of images labels Dec 2, 2018
@swissspidy
Copy link
Member

A gallery is a list of pictures, So I can understand where this is coming from.

The change was made in #3441 to fix #2900, which suggested this change.

I suppose a quick fix would be to make Gutenberg apply a CSS class to both unordered and ordered lists for theme authors to target

Related: #12420

@youknowriad
Copy link
Contributor

As discussed in the previous issue and suggested by the a11y team, the decision for now is to keep the Gallery as a list of images, we can still revisit in the future if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images Needs Accessibility Feedback Need input from accessibility Needs Design Feedback Needs general design feedback.
Projects
None yet
Development

No branches or pull requests

2 participants