intanpalupidn / jquery-oembed

Automatically exported from code.google.com/p/jquery-oembed
0 stars 0 forks source link

Missing ALT attribute for image embeds, for example from Flickr #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, oEmbed is a great idea! I hope my fix will help. Yours, Nick.

What steps will reproduce the problem?
 1. Put the Flickr oembed example on the project home
(http://code.google.com/p/jquery-oembed/) in a HTML file.
 2. View the source generated by the Javascript in a browser (eg. use Web
Developer extension for Firefox).
 3. Optionally validate the generated source, eg. at http://validator.w3.org/

What is the expected output? What do you see instead?
  -Expected: I expect to see an ALT attribute for the <IMG> element,
especially when inside a link, the JSON output here includes a title which
should be used - also author_name and provide_name could be appended,
http://oohembed.com/oohembed/?url=http%3A//flickr.com/photos/fuffer2005/24353399
94/

  -Actual: missing ALT attribute on image inside link - bad for
accessibility, http://w3.org/TR/WCAG20/#text-equiv

  -Expected 2: additionally, forcing the link to open in a new window
(target=_blank) is not good for accessibility, and is not the expected
behaviour for many users now.

What version of the product are you using? On what operating system?
  -jquery.oembed.min.js v1.0.1, Firefox 3.5, Win XP Home.

Please provide any additional information below.
  -I attach a proposed fix for function, $.fn.oembed.getPhotoCode
  -Non-minified, lines 33-35 added "var alt...", new line 36 modified.

Original issue reported on code.google.com by n.d.freear on 5 Sep 2009 at 11:19

Attachments:

GoogleCodeExporter commented 8 years ago
Hi, I should have said, OEmbed is very practical, and so is this jquery wrapper!

And I should have noted above that my proposed fix has localization 
implications - it
uses the English "by" and "on". I suppose dashes "-" could be used, though the 
words
would be more informative when experienced with a screen reader (try
http://nvda-project.org/ -free & for Windows, I'm not affiliated!)

FYI,
  I'm going to propose that 'title' becomes a required parameter in OEmbed responses,
see the specification http://oembed.com/ (2008-07-18) section 2.3.4. This is
important for all response types, 'photo', 'video', 'link', 'rich'. I hope it 
won't
be controversial as many of the responses for major providers (YouTube, Flickr, 
etc.)
already have titles.

Yours, Nick
http://freear.org.uk

Original comment by n.d.freear on 5 Sep 2009 at 11:35

GoogleCodeExporter commented 8 years ago
Thank you for your patch Nick!

I have just uploaded a new version updated with your modifications and some 
more.

Original comment by rchamo...@gmail.com on 1 Oct 2009 at 3:16

GoogleCodeExporter commented 8 years ago

Original comment by rchamo...@gmail.com on 1 Oct 2009 at 3:31

GoogleCodeExporter commented 8 years ago
A bit late, but thanks Richard.
Yours, Nick

Original comment by n.d.freear on 12 Mar 2010 at 10:47