Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images inside links #1130

Open
ChristopherChudzicki opened this issue Mar 15, 2022 · 6 comments
Open

Images inside links #1130

ChristopherChudzicki opened this issue Mar 15, 2022 · 6 comments

Comments

@ChristopherChudzicki
Copy link
Contributor

ChristopherChudzicki commented Mar 15, 2022

Issue: Survey usage of images as "titles" for links in OCW content.

Results

Links inside images have been problematic for CKEditor editing. The "link title" (which is an image) tends to get extra escapes the content is saved in CKEditor. There are two categories

  1. Image specified by shortcode: [< resource resource_uuid >](link url)
  2. Image specified by markdown: [![img description](image url)](link url)

To reolve (1), we've discussed adding an href-like param to the < resource > shortcode and changing CKEditor to preserve those params.

That approach will not resolve Issue type (2). There are about ~1900 of type (2) image links, but most are:

  • "Buy at Amazon"
  • "Buy at MIT press"
  • "Might display well on screen reader"
  • Some kind of invisible trans.gif thing... Example: This legacy OCW site ... below "Functions of Two Variables Mathlet" there is some highlightable invisible text. If you inspect it in the dev console, it's some weird invisible links with images inside them.

There are about 120 of type (2) that do not fall in the above categories, but they are fairly limited in scope. (See this google sheet for more details):

site_name                                                                       ,count
6-849-geometric-folding-algorithms-linkages-origami-polyhedra-fall-2012         ,41
ec-s06-design-for-demining-spring-2007                                          ,30
11-307-beijing-urban-design-studio-summer-2008                                  ,18
21a-550j-dv-lab-documenting-science-through-video-and-new-media-fall-2012       ,11
18-04-complex-variables-with-applications-fall-1999                             ,9
4-614-religious-architecture-and-islamic-cultures-fall-2002                     ,7
2-00aj-exploring-sea-space-earth-fundamentals-of-engineering-design-spring-2009 ,6
1-061-transport-processes-in-the-environment-fall-2008                          ,2
8-02-physics-ii-electricity-and-magnetism-spring-2007                           ,1
8-02t-electricity-and-magnetism-spring-2005                                     ,1

Google Sheet: https://docs.google.com/spreadsheets/d/11uxB165n3DKAjcExBnE4VNDM2p37zOQV3f_I1viIy4M/edit#gid=1372806831
SQL Queries: (In case we want to rerun this) queries.txt

@pdpinch pdpinch self-assigned this Mar 15, 2022
@pdpinch pdpinch changed the title Images inside links census Images inside links Mar 15, 2022
@pdpinch
Copy link
Member

pdpinch commented Mar 15, 2022

I'll assign this to myself until we decide what to do about these

@pdpinch
Copy link
Member

pdpinch commented Mar 18, 2022

FYI, I just met with the OL accessibility expert and she told me that we should not continue using the hidden image with alt tag to flag "inaccessible" PDFs. She claims that many more PDFs are accessible than we think, and that it's no safe for us to assume what a user can or wants to get out of file. It's sufficient to indicate that it's a PDF. And, if we really wanted to be helpful, we would have a note that explains the content of the PDF, rather then just tell users "this isn't for you."

In practice, this means that we should strip out all the inaccessible.gif images. We'll still have the source data if we want to do something with it later, but there's no reason to support these images.

@pdpinch
Copy link
Member

pdpinch commented Mar 18, 2022

  1. Image specified by shortcode: [< resource resource_uuid >](link url)

This will be addressed by a combination of:

@pdpinch
Copy link
Member

pdpinch commented Mar 18, 2022

  1. Image specified by markdown: [![img description](image url)](link url)

    • "Buy at Amazon"

I'm pretty sure these should be removed, but I'll need to check with the OCW team.

@ChristopherChudzicki
Copy link
Contributor Author

ChristopherChudzicki commented Mar 18, 2022

@pdpinch If we do want to remove these, can you clarify whether we want to remove just the image or the whole "Buy at Amazon" thing? I.e, does

[![Buy at Amazon](/images/a_logo_17.gif)](http://www.amazon.com/exec/obidos/ASIN/0415039495/ref=nosim/mitopencourse-20) 
    Hebdige, Dick. _Subculture: The Meaning of Style_. Routledge, 1979. ISBN: 9780415039499.

become

  1. [Buy at amazon](url) Hebdige ...ISBN: 9780415039499, or just
  2. Hebdige ...ISBN: 9780415039499

@pdpinch
Copy link
Member

pdpinch commented Apr 14, 2022

In reply to #1130 (comment)

The link to purchase at Amazon should be removed. The answer is #2 above.

@pdpinch pdpinch removed their assignment Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants