Steps to reproduce

1. Install media
2. Upload an mp3.
3. Try to find the MP3... you'll notice it's missing!
4. It's in the DOM, but has its height set to auto.

If we remove that rule, it works.

Note that this behavior can be seen on https://tugboat-aqrmztryfqsezpvnghut1cszck2wwasr.tugboat.qa/node/59 (scroll way down to where it says "Sample Audio (MP3)")

Comments

mherchel created an issue. See original summary.

mherchel’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new628 bytes

This does the job. Here is a Tugboat URL that shows that the problem is fixed.

https://3180756-audio-lmlsyegmnmgunwmbig49h48ohxd5djm4.tugboat.qa/node/59

ranjith_kumar_k_u’s picture

StatusFileSize
new145.16 KB
new130.27 KB

The patch working fine
Before patch
before patch

After Patch
after patch
RTBC

ranjith_kumar_k_u’s picture

Status: Needs review » Reviewed & tested by the community
lauriii’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs manual testing

It would be good if we could get some more screenshots on other supported browsers https://www.drupal.org/docs/system-requirements/browser-requirements

anmolgoyal74’s picture

Status: Needs work » Needs review
StatusFileSize
new85.9 KB
new112.85 KB

The issue exists on the chrome browser, fixed after the patch.

I have checked it on safari, working fine before and after the patch.

mherchel’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @anmolgoyal74

lauriii’s picture

Status: Reviewed & tested by the community » Needs review

I'm mostly concerned about removing the display: block declaration because the default value for the property for this element would be inline (at least based on https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio#Styling_...). I'm also curious if the removal of the max-width declaration has impact on the designs. Wouldn't the correct fix here to remove the height: 0 from audio, but keep the display and max-width intact?

mherchel’s picture

Version: 9.1.x-dev » 9.2.x-dev
StatusFileSize
new758 bytes

Updated patch attached

proeung’s picture

Status: Needs review » Reviewed & tested by the community

The audio is now displayed fine with the patch submitted in #9. Marking this issue as RTBC.

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/themes/olivero/css/base/base.pcss.css
@@ -51,11 +51,13 @@ a {
 img,
...
 video {
+  height: auto;
+}
...
+audio {
   display: block;
   max-width: 100%;

img and video should also get display: block and max-width: 100%.

mherchel’s picture

Status: Needs work » Needs review
StatusFileSize
new903 bytes

Good catch. Updating patch.

proeung’s picture

Status: Needs review » Reviewed & tested by the community

@lauriii Great catch!

@mherchel The latest patch looks good!

  • lauriii committed f8ad4f8 on 9.2.x
    Issue #3180756 by mherchel, ranjith_kumar_k_u, anmolgoyal74, lauriii,...

  • lauriii committed 1243ed5 on 9.1.x
    Issue #3180756 by mherchel, ranjith_kumar_k_u, anmolgoyal74, lauriii,...
lauriii’s picture

Version: 9.2.x-dev » 9.1.x-dev
Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs manual testing +Needs followup
StatusFileSize
new306.35 KB

We should open follow-up to improve the audio styles. For example, I placed audio in the beginning of an article and there was no margin between the image and the audio controls.

Committed f8ad4f8 and pushed to 9.2.x. Also cherry-picked to 9.1.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.