GithubHelp home page GithubHelp logo

Comments (5)

evanwill avatar evanwill commented on September 25, 2024

I unintentionally (because I was talking to Olivia and not paying attention) updated this in master to a more accessible, yet oddly annoying version (because tooltip pops up in the middle of the image, rather than at the bottom).
It is really is much better accessibility wise (from not at all, to actually sort of useful). But not sure it is a good solution.

from collectionbuilder-cdm-template.

owikle avatar owikle commented on September 25, 2024

Another solution: we were also thinking about just getting rid of the tooltip altogether and only using it on pdf collections...

from collectionbuilder-cdm-template.

dcnb avatar dcnb commented on September 25, 2024

I added a "tooltip" branch that makes that tag's display property "inline-flex"

This seems to keep the accessibility feature and the former way of using the tooltip. I also got rid of the tooltip delay feature on the javascript snippet, as it seemed unnecessary, but I didn't know if that was an accessibility piece or not. Was it?

I like the tooltips for use on non-mobile. I feel like they invite investigation and they keep the page really clean.

I see how they're not that useful on mobile, but I don't think that's a terrible thing. We could experiment with adding some info that only appears on mobile?

I'm glad to fix the accessibility though and to keep the functionality as it was. Evan, if you think this acceptable, I'd like to add it in.

from collectionbuilder-cdm-template.

evanwill avatar evanwill commented on September 25, 2024

The accessibility is fine (test by clicking tab and going through the page--it needs to display when focused). I think I would use bootstrap d-inline-flex rather than create a custom style for it.

But I don't like it because this introduces weird implications to sizing that don't make sense, and distort image ratios and spacing (there might be a way to fix it by making sure it is all styled by flex, rather than a mix, but I don't really understand why it sort of works, so not sure how to fix it).

Look close at the thumbs and toggle it on and off:

  • When normal, it displays the thumb at the natural ratio--height is set at 110px by css, then width is set following the original aspect ratio based on the intrinsic size.
  • When inline-flex, the image ends up getting pulled into a ratio based on the box size (or something?), so you end up with distorted ratios. For what ever reason, the image is now 100px height, and then some calculation creates odd distorted ratios for narrow images to make them more square (making them wider--pdfs looks weirdly wide and people fat) and spacing between images becomes inconsistent. I don't really understand.

I added the tooltip delay just because I thought it looked a bit less tweaky as you are going through.

from collectionbuilder-cdm-template.

evanwill avatar evanwill commented on September 25, 2024

hey @dcnb try just d-inline-block instead, seems to do the same thing to the tool tip without introducing weirdness?

from collectionbuilder-cdm-template.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.