Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 20 months ago

#47665 closed defect (bug) (wontfix)

validator.w3.org errors

Reported by: omer-faruk-ekinci's profile Omer Faruk Ekinci Owned by: audrasjb's profile audrasjb
Milestone: Priority: normal
Severity: normal Version:
Component: Gallery Keywords: has-patch needs-testing has-unit-tests
Focuses: Cc:

Description

Hi

https://d.pr/free/i/hm29q9 Please fix gallery widgets problem

Ninetheme

Attachments (1)

47665.patch (482 bytes) - added by dkarfa 5 years ago.

Download all attachments as: .zip

Change History (12)

#1 @audrasjb
5 years ago

  • Owner set to audrasjb
  • Status changed from new to reviewing

#2 @audrasjb
5 years ago

  • Keywords needs-unit-tests removed
  • Version trunk deleted

@dkarfa
5 years ago

#3 @swissspidy
5 years ago

  • Keywords has-patch needs-testing added

#4 @audrasjb
5 years ago

  • Keywords 2nd-opinion added

Even if the use of an empty dd element is ok for the validator, the use of a list of definitions with an empty dd element sounds strange to me.

I wonder if we shouldn't simply use an unordered list here.

By the way, I'm ok that the empty dd is a good first way to fixe the validation error.

This ticket was mentioned in Slack in #core by hareesh-pillai. View the logs.


5 years ago

#6 @pento
5 years ago

#39058 was marked as a duplicate.

#7 @pento
5 years ago

  • Keywords 2nd-opinion removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from reviewing to closed

Thank you for the bug report, @omer-faruk-ekinci!

While this report is valid, I'm going to close this ticket, for a few reasons:

  • This seems to only be an issue for the w3 validator, there are no reports of browsers or screen readers having issues with the lack of <dd> element.
  • This only affects the gallery shortcode in the classic editor (or classic block in the block editor). Both of these use cases are heading in to long term maintenance mode, during which minor bug fixes are unlikely to land.
  • It would require a non-trivial amount of time to test and ensure this change doesn't accidentally cause other issues.

#8 @SergeyBiryukov
5 years ago

  • Component changed from Widgets to Gallery

This ticket was mentioned in PR #3973 on WordPress/wordpress-develop by @andrewserong.


20 months ago
#9

  • Keywords has-unit-tests added

This PR backports the PHP parts of the new sticky position block support, and is a follow-on from https://github.com/WordPress/wordpress-develop/pull/3865

Backports the PHP parts of the following PRs:

Notes on this backport:

  • The backport deviates from Gutenberg trunk in one way: fixed position type is excluded from the appearance tools opt-in: this is because fixed positioning isn't being opted-in for the Group block and isn't ready to be used as a default opt-in. The code paths exist for fixed positioning as it will be supported in the future, but for now, sticky is the only one exposed by default. (The overall block support should still support it as a valid value, though)
  • The styling output while logged in depends on the JS packages update, as it will include the CSS changes in #47665, so while testing this PR you might notice an odd styling issue while logged in. This should be resolved once the package update lands.
  • With the above caveat shouldn't really be an issue though, as there is no way for a user to set a group block to sticky without the JS packages landing. This PR is to land the required PHP changes in advance of that.

Screenshots:

| While logged in (CSS variable that's included in JS packages update isn't yet output in this PR, once it is the sticky block will sit below the admin bar) | While not logged in (correct) |
| --- | --- |
| https://i0.wp.com/user-images.githubusercontent.com/14988353/216517776-9937bc74-f89a-4d84-8d46-6b7f64f08b9d.png | https://i0.wp.com/user-images.githubusercontent.com/14988353/216517836-4e61edbe-0c04-4ed1-aa4e-7ee98c5afa9f.png |

Testing instructions:

  • In the Group block's block.json file add a "position": { "sticky": true } object under "supports" (Note: for this change to propagate in your testing, you might need to rebuild the block JSON cache locally).
  • Create a post and add a bunch of paragraphs.
  • Insert the below markup at the beginning of the post (this is Group block markup with the appropriate position style object to sticky to top).
  • Publish the post, and on the site frontend, the group block should stick to the top of the screen once it has been scrolled past the top of the screen (the block sticks to the scrollable area of its container)

Group block markup for testing purposes:

{{{html

<div class="wp-block-group has-background" style="background-color:#f2aeae;padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em">
<p>A paragraph in a sticky group</p>
</div>

}}}

Trac ticket:

@andrewserong commented on PR #3973:


20 months ago
#10

Thanks for reviewing @felixarntz!

Does this have to wait for the JS package update, or can it be committed to core before already?

This can be committed before the JS package update, since this PR doesn't opt any of the blocks into the new control, so it doesn't expose anything to a user. I think it's preferable to land this PR first, so that when the JS packages update happens, the PHP parts will already be in place.

Note: See TracTickets for help on using tickets.