Media Meeting Recap – November 7, 2019

The following is a summary of the weekly media component meeting that occurred on Thursday, November 7, 2019. Weekly media meetings are held every Thursday at 14:00 UTC. A full transcript can be found here in the #core-media room in the Make WordPress Slack.

Attendees: @joemcgill , @mikeschroder, @afercia, @desrosj, @dinhtungdu, @karmatosed, @greglone, @azaozz

Meeting Time Discussion

It’s that time of year again (for some of us!) Fall Daylight Savings Time historically makes the meeting time move forward one hour. The next meeting will take place Thursday, November 14, at 14:00 UTC.

There was discussion in a group message consisting of meeting facilitators around potentially doing a rotation of one week at a convenient time for each side of the planet. The Hosting-Community room does this and it seems to work very well. This would allow for participation from groups outside of the normal hour that we hold the meeting while also allowing folks that have been stretching outside their normal work hours to catch the meeting async. Please let us know in the comments what you think about this! There was mention of potentially doing a few months on one schedule and a rotation after. Another suggestion was around doing many meetings instead of rotating meetings. This would entail two designated meeting times a week in an effort to encourage new participants. This topic will be discussed in the next Media Meeting. Any additional ideas would be appreciated.

WordPress 5.3 Tasks

There were three tickets discussed in the meeting.

  1. #48518 Inconsistent behavior when a registered image size is larger than the big image threshold – Testing is being done around this issue and should be ready for 5.3.
  2. #48451 Regression: wp_update_attachment_metadata filter now fires very often and without complete metadata – The Follow Up Post around this outlines a few areas to focus on with the recent uploads changes. Some discussion took place around whether or not a new hook would help folks adjust to the changes. This is still to be determined.
  3. #48522 Attachment size not generated when large images uploaded – A few more details about this issue can be found at this Slack Link. Testing would be appreciated on this ticket.

Feedback

If you have any feedback on the above, please feel free to leave a comment, join in #core-media for a chat, or attend the next meeting on November 14, 2019 at 14:00UTC!

#core, #core-accessibility, #core-media, #media, #summary

Improvements in Media component accessibility in WordPress 5.3

Form controls are still unlabelled in WordPress media views. Some don’t have associated <label> element, <aria-label>attribute or some have an empty label.

Properly labeling form controls is essential for a basic level of accessibility, as labels give form controls their accessible name. The name is then used by assistive technologies to inform users what the form control is about. Not to mention visible <label> elements are clickable and help users with motor impairments to set focus on the associated form control.

Also, the WordPress accessibility coding standards recommend explicitly associated labels (with for/id) attributes instead of implicitly (wrapping) labels.

WordPress 5.3 will now include some accessibility improvements of all the media views from controls:

  • Changes the media views form controls to have explicitly associated labels with for/id attributes
  • Adds a few missing labels / aria-labels
  • Improves a few existing labels / aria-labels
  • Improves semantics in a few places, by adding visually hidden headings, fieldset + legend elements, aria-describedby attributes
  • Improves the image custom size input fields and their labeling
  • Adds role=”status” to the “saved” indicator so that status messages are announced to assistive technologies
  • Swaps the columns source order in the image details template, to make visual and DOM order match
  • Swaps the “Replace” and “Back” buttons source order in the Replace Image view, to make visual and DOM order match
  • Gallery settings: move checkbox label to the right: checkboxes are supposed to have labels on the right
  • Merge similar strings, unified to “Drop files to upload” (removed “Drop files here”, and “Drop files anywhere to upload”)
  • Makes the “upload-ui” consistent across the media views
  • Hides the IE 11 “X” ::-ms-clear button in the Insert from URL field, as it conflicts with the uploading spinner
  • Adds comments to all the media templates to clarify their usage
  • Slightly increases the vertical spacing between form fields in the media sidebar
  • Removes some CSS selectors introduced as backwards compatibility for WordPress pre-4.4
  • Removes some CSS still targeting Internet Explorer 7 and 8
  • Fixes buttons group layout for Internet Explorer 11

The most important change to clarify is that the labeling changed from this (implicit labeling):

<label>
    My input
    <input type="text" />
</label>

to this (explicit labeling):

<label for="my-input">My input</label>
<input type="text" id="my-input" />

Simplified code sample


More details on these improvements can be found in Trac ticket #47122.

This note was drafted by @justinahinon and proofread by @afercia.

#5-3, #accessibility, #dev-notes, #media

Updates to Image Processing in WordPress 5.3

WordPress 5.3 includes several enhancements to how images are used and post-processed after upload.

When an image is uploaded to WordPress, alternate smaller sizes are automatically created. Some of these “intermediate” sizes are defined by core, and others by themes or plugins. These are used both for art direction uses, like alternate crops, and automatically by core for responsive images if they are the same aspect ratio.

Resizing images is very resource intensive. As average image sizes have increased over time, this has only increased the chances that requests may time out or run out of memory. WordPress 5.3 includes several enhancements to help more uploads succeed, and to aid users in recovery when they do not. These changes also enable WordPress to generate two new, higher resolution default sizes, to help user images look their best.

Saving of image metadata while creating intermediate sizes

Before 5.3, WordPress would first generate all intermediate sizes before saving proof of their existence in the database in meta.

This meant that if an upload failed in the middle, there could be many sizes that had completed successfully stored, but this wouldn’t be reflected in the database. A user’s only recourse was to re-upload over and over again in the hope that their server was less busy and all of the sizes would be generated.

In 5.3, this problem is fixed through saving metadata for each size as it is created in the database. This means more database writes, but allows WordPress to use the sizes generated earlier, and to resume failed uploads.

To make this possible, a new method make_subsize() was introduced in the WP_Image_Editor_GD and WP_Image_Editor_Imagick classes. It returns the new sub-size image path and dimensions ready to be added to the image meta’s sizes array. See #40439.

Additional changes:

  • Introduces wp_get_missing_image_subsizes() and wp_update_image_subsizes() to generate image sub-sizes that are missing or were not created after the upload.
  • Adds a way to display errors that happened while creating sub-sizes.
  • Introduces wp_create_image_subsizes() intended for use after an image was uploaded. It saves/updates the image metadata immediately after each sub-size is created.

With that in place it became possible to attempt to finish post-processing of images after upload if the server runs out of resources while creating intermediate image sizes (the dreaded “HTTP Error” message). See #47872.

“BIG image” enhancements

Until now it was possible to use the originally uploaded images on the front-end even when they are were not “web ready”. In WordPress 5.3 when a large image is uploaded it is stored in the uploads directory but is not used on the web site. A new scaled down image is created and used as the largest available size. This scaled down image is usually much more suitable for web use, the file size is up to ten times smaller than the original. See #47873.

Additional changes:

  • Introduces wp_get_original_image_path() that retrieves the path to the originally uploaded image in all cases.
  • Introduces big_image_size_threshold filter to set the pixel value above which images will be scaled. The same value is used as max-width and max-height when scaling the original.

These enhancements also made it possible to automatically rotate uploaded photos according to the EXIF data, and to add two additional default image sizes to better support high-density displays. See #14459 and #43524.

Thanks @mikeschroder for helping to write this post.

#5-3, #dev-notes, #media, #upload

Media Meeting Recap – September 19, 2019

The following is a summary of the weekly media component meeting that occurred on Thursday, September 19, 2019. Weekly media meetings are held every Thursday at 13:00 UTC. A full transcript can be found here in the #core-media room in the Make WordPress Slack.

Attendees: @anevins, @joemcgill , @FahimMurshed, @mikeschroder, @antpb, @afercia

Media Focus update: @mikeschroder has been hard at work on a 5.3 intro post. In it will be a focus on calling for testing.  Coming soon!

Add width and height attributes to <img> elements – https://github.com/WordPress/gutenberg/issues/6652
Discussion is taking place in this Slack thread. Maintainers in attendance all agreed that this would be great to be considered a bug and a potential impactful improvement to the editor experience. @joemcgill said, “Realistically, I think a first step is just adding a proof of concept that modifies the save attribute of the image block so the h/w attributes are always saved and then see what breaks.”

5.3 Ticket Triage

#47120Media modals: Upload errors and field information are not associated with their control : @antpb has taken ownership of the ticket and will investigate how we would best inject the recommended code into the various buttons/views.

#47137Insufficient form semantics : This issue was split into two issues (the other below) to allow the overall problem to improve in pieces. Ownership for this one is needed. It’s a bit of a tough issue that no one has yet to see an immediate solution.

#48028Media Library ‘featured image’ dialogue missing link text that describes ‘opens in new tab’.@afercia said “I think there’s the need to check how editState is implemented in the post frame and what is intended for. That implementation completely lacks in other frames. I think this is for historical reasons because the post frame was the only frame supposed to be used in the “edit post” context.” and @joemcgill responded “The classic editor used the Post frame in most places, rather than the Select frame. Now that most of Gutenberg is using the Select frame, some odd bits aren’t working the same—just like that other featured image bug you (@antpb) just fixed” @antpb assigned the issue to himself given his recent exposure to the featured image frames. A github issue is needed also to track this change in the Gutenberg plugin @antpb is working on that. More to come!

#47144Text inadvertently rendered by assistive technologies – Was mentioned at end of meeting but discussion was not able to be had. This issue is in need of ownership for the 5.3 release.

#47611Media views: hide the “file upload button” from assistive technologies – Was mentioned at end of meeting but discussion was not able to be had. This issue is in need of ownership for the 5.3 release.

Bug Scrubs next week!

@mikeschroder and @antpb have offered to lead two bug scrubs in #core-media next week to find ownership for the remaining accessibility issues planned for the 5.3 milestone:

Feedback

If you have any feedback on the above, please feel free to leave a comment, join in #core-media for a chat, or attend the next meeting on September 26, 2019 at 1300UTC!

#core, #core-accessibility, #core-media, #media, #summary

Media Meeting Recap – September 5, 2019

The following is a summary of the weekly media component meeting that occurred on Thursday, September 5, 2019. Weekly media meetings are held every Thursday at 13:00 UTC. A full transcript can be found here in the #core-media room in the Make WordPress Slack.

Attendees: @anevins, @sergeybiryukov, @pstonier , @afercia, @francina, @mikeschroder

Media Focus Lead for 5.3

Much like the 5.0 release, 5.3 will have many designated release leads around each focus/component in the project. 5.3 is right around the corner and now is the time for a decision to be made on a release lead representing the Media component. Previously @antpb had offered to take on the role if no others were interested. In this weeks Media meeting, a volunteer emerged! @mikeschroder has graciously offered to take on this role. Thanks Mike! Mike is in the JST time zone. This brings an awesome opportunity to have global representation in the team. @antpb has offered to help with relaying information or representing where time zones do not conveniently meet for Mike.

5.3 Ticket Triage

#47135 – Drag and drop functionality unavailable to keyboard or touchscreen — It was determined by the team that this issue exists more globally in meta boxes. It was deemed appropriate to document the information from the Media focused instance of this in an existing ticket on the issue: #39074 No method to move meta boxes using keyboard which was also given the keyword wpcampus-report for tracking purposes.

#47137 Insuficient form semantics – @anevins asked “Is there a technical reason why there isn’t a form element being used around that attachments browser code? That would defeat all of the remediation advice.” @afercia had these recommendations: “Ideally it should be a form because that helps in establishing semantic relationships. However, the sidebar is not rendered in all the views, so including the select area, the attachments list and the sidebar within one form might be a bit complicated.
The list of attachments is perceived as a list of checkboxes so it makes sense to wrap it within a fieldset + legend. I’d tend to think it would need more work in the future because yes, it’s a group of checkboxes but it actually works like a mini-application with custom interaction. I’d say fieldset + legend would help, for now.”

Triage on unanswered tickets continued after the meeting closed, and can be followed here.

Feedback

If you have any feedback on the above, please feel free to leave a comment, join in #core-media for a chat, or attend the next meeting on September 12, 2019 at 1300UTC!

#core, #core-accessibility, #core-media, #media, #summary

Media Meeting Recap – August 29, 2019

The following is a summary of the weekly media component meeting that occurred on Thursday, August 29, 2019. Weekly media meetings are held every Thursday at 13:00 UTC. A full transcript can be found here in the #core-media room in the Make WordPress Slack.

Attendees: @joemcgill, @anevins, @desrosj, @horttcore, @paaljoachim, @mikeschroder

5.3 Tickets

@azaozz requested review on the latest patches in #43524, #47873, #47872, #32437. He plans to commit them before the end of the week.

Chatting About Sizes

@pierlo asked for a discussion on #43524, which is about adding an additional image size.

Folks seemed to agree that it makes sense to add another one, and that it’d be great if sizes could be backfilled in the future, but that’s likely not for 5.3.

Connected to that, there was a conversation about the direction WordPress could take with sizes in 5.4 and beyond. Things discussed included a feature like add_image_size for attachments, delivering srcset sizes based on file size, and resizing after theme change.

If that sounds interesting, you can read the whole discussion here.

Ticket Triage

  • #47215: The media that is “Unattached” is different in list mode vs grid mode — @desrosj was able to reproduce, and is going to do a bit more testing.
  • #47215: The media that is “Unattached” is different in list mode vs grid mode — @joemcgill notes that this is an intentional behavior, meant to avoid clutter in the media library due to site icons or headers. This may need to be revisited.
  • #47364: Docs: Standardise the description for image size parameters — @joemcgill agreed to review the ticket and clarify the goals.
  • #47444: Deprecate the caption field from the media modal — Folks present noted use-cases for this, and @joemcgill to leave a comment.

Triage on unanswered tickets continued after the meeting closed, and can be followed here.

Feedback

If you have any feedback on the above, please feel free to leave a comment, join in #core-media for a chat, or attend the next meeting on September 5, 2019 at 1300UTC!

#core, #core-accessibility, #core-media, #media, #summary

Media Meeting Recap – August 23, 2019

The following is a summary of the weekly media component meeting that occurred on Thursday, August 23, 2019. Weekly media meetings are held every Thursday at 13:00 UTC. A full transcript can be found here in the #core-media room in the Make WordPress Slack.

Attendees: @joemcgill, @anevins, @pbiron, @desrosj

5.2.3 Media Tickets

All relevant tickets have been closed. 🎉 Props @sergeybiryukov on back-porting bug fixes.

5.3.0 Release Media Lead

Following up on the 5.3.0 Release Schedule and Scope, we were asked to identify a Media release lead. To coordinate media related tickets.

  • @antpb has expressed interest in doing this again, but wanted to open up the opportunity to anyone else interested.
  • @joemcgill wondered if this role was redundant with @azaozz role as Core technical lead, since most of the priority Media items are ones he is already working on.

If you’re interested in volunteering for this role, feel free to comment here, in #core-media, or DM @joemcgill or @antpb directly in Slack.

5.3.0 Tickets

  • #47156: Consider a way to clear the wp.a11y.speak() live regions – @anevins followed up and noted that the Drupal a11y team have a similar issue and this might be a limitation of aria-live regions, generally. The plan is to follow up with the #core-accessibility team this week.
  • #44581: users without ‘edit_posts’ capability never get informed that their uploads succeed – @pbiron asked that this get moved into the 5.3 release for review.
  • #47872: Try to create image sub-sizes again when uploading fails with a PHP fatal error – @azaozz asked for review, noting that testing requires the client to re-try creation of image sub-sizes after uploading an image and the server “crashes” with HTTP 500 error.
  • #40439: Save progress of intermediate image creation after upload – @azaozz believes this is complete, but would like more testing before closing.
  • #47873: Introduce handling of “Big Images” – @azaozz added as a new enhancement. Feedback appreciated.
  • #40175: Upload Validation / MIME Handling – @joemcgill noted that this stalled out after 5.2 and with the focus for 5.3 being on improving handling of large image uploads, would need to be punted to a future release unless someone else wants to pick it up for 5.3.
  • #35725: Add mime-type for Webp – @joemcgill doesn’t think #40175 should be a blocker for this ticket, but wasn’t sure if it should be in core without full browser support.

#core, #media, #summary

Media Meeting Recap – August 15, 2019

Overview

The following is a summary of the weekly media component meeting that occurred on Thursday, August 15, 2019. Weekly media meetings are held every Thursday at 13:00 UTC. A full transcript can be found here in the #core-media room in the Make WordPress Slack.

Attendees: @joemcgill, @anevins, @sergey, @antpb, @adamsilverman

5.3 A11y Related Tickets

@anevins lead a triage of the a11y related tickets from the WPCampus audit for 5.3 to try and make sure everything had an owner and/or some next steps to move forward.

Now that all tickets have been triaged, @joemcgill suggested that we keep the latest information in Trac so we can use this report to track status of the a11y related tickets throughout the 5.3 cycle.

5.3 Release Media Lead

@antpb asked if anyone was interested in being the Media lead for the 5.3 release. He served in this capacity for the 5.0 release and is willing to do so again for 5.3 if needed. @joemcgill reached out to @chanthaboune in #core following the meeting to clarify what this role would be responsible for (see chat). Essentially, this person would be the primary person responsible for communicating status from the component team and gathering consensus when decisions need to be made. This person is not responsible for completing all the work themselves, but should be leaning on the rest of the component maintainers and contributors to meet our release goals.

If you’re interested in volunteering for this role, feel free to comment here or in #core-media.

5.2.3 Release Tickets

@joemcgill noted that there are several Media issues listed in @jeffpaul‘s 5.2.3 release proposal. These need to be reopened as fixed-major so they can be back ported to the minor release and the milestone needs to be updated. @joemcgill volunteered to handle this.

#media, #summary

Improve processing of uploaded images

As mentioned in dev chat on May 15 there are quite a few “stalled” tickets on Trac dealing with image processing/resizing after uploading:

All of these, and more, can be “unblocked” by: Save progress of intermediate image creation after upload #40439.

Fixing this will also enable “refreshing” of the way we do responsive images, and will enable improvements in how we generally work with images in the block editor. Then we will be able to enhance the Image block and make it “just work” regardless of the context, see Enhancement: images handling and more importantly https://github.com/WordPress/gutenberg/issues/6177#issuecomment-442953527.

In short: fixing the above tickets will greatly improve user experience especially when uploading large images or the server is slow/busy. It will also open the way for enhancing how we work with images in the editor, and let us show better fitting images on the front-end.

#media, #upload

Media Meeting Recap – February 7, 2019

Overview

The following is a summary of the weekly media component meeting that occurred on Thursday, February 7, 2019. Weekly media meetings are held every Thursday at 21:00 UTC. A full transcript can be found here in the #core-media room in the Make WordPress Slack.

Attendees: @antpb, @aaroncampbell, @mikeschroder, @designsimply, @sergeybiryukov, @pbiron, @swinterroth, @dave_navarro

Triage

The agenda today was extended ticket triage for this list.

  • #41753: _wp_get_attachment_relative_path uses hardcoded uploads directory path: noted that it affects multisite and needs testing.
  • #41816: attachment_url_to_postid() should find post_id for URLs of intermediate size images: patch was previously abandoned because the heuristic wasn’t reliable, @pbiron will dig up the gist and leave a comment. In summary: #44095 and #42437 need to be fixed before moving forward with a revised patch for #41816.
  • #41922: Gallery hard to open for edit – rtl (hebrew) version: @antpb will test and leave feedback in the ticket.
  • #42063: Media: Indicate if image is used as a site option: @mikeschroder will leave a reply. It’s already future release.
  • #42487: Avoid redundant crops for all Customizer media controls: moved to future release.
  • #42751: Can we please enqueue media-views independently? @antpb offered to move the question about how mediaelement CSS is loaded to a separate issue. No consensus on the original question, left in awaiting review.

Next meeting

The next weekly media meeting will be held on Thursday, February 14, 2019, at 21:00 UTC in the #core-media room in the Make WordPress Slack.

#media, #summary