Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293938

Avoid horizontal scrollbar in media library dialog when using small viewports

$
0
0

Problem/Motivation

While working on the media library, I noticed it was getting a horizontal scrollbar on smaller screens. In the seven theme, label elements in forms get a display: table;. In the media library, a visually hidden class is added to hide some labels. The width, height and overflow properties do not work correctly if the element has a table display, causing the visually hidden element to take up space while it shouldn't.

Screenshot of issue with visually hidden element.

Steps to reproduce:

  • Install the standard profile.
  • Enable the media and media library module.
  • Add a media field to the article node type with at least the image media type enabled.
  • Configure the media library widget for the field on the form display.
  • Create a new article.
  • Open the media library with at least 5 items in it.
  • Make your browser window smaller.

Proposed resolution

Add display: block; to the visually-hidden class properties.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Sign-offs required

DO NOT commit any change to the implementation of. visually-hidden without sign-off from an accessibility maintainer. This can have far-reaching effects, and should be tested with as much assistive tech as possible.


Viewing all articles
Browse latest Browse all 293938

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>