Bug 15331 - Title content: check SVGs in online library
Summary: Title content: check SVGs in online library
Status: RESOLVED NOTOURBUG
Alias: None
Product: openclipart.org
Classification: Unclassified
Component: website (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: default user for a product
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 8627
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-02 15:00 UTC by peepo
Modified: 2010-08-18 03:24 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description peepo 2008-04-02 15:00:16 UTC
attached a practical solution**

According to the SVG specification:
        Authors should always provide a 'title' child element to the outermost
'svg' element within a stand-alone SVG document.

according to a recent grep search of over 6000 openclipart images only around 6
had titles.

titles are a critical requirement for accessibility similar to alt in html.
http://iconomy.org for a demonstration of their use.

http://www.w3.org/TR/SVG11/struct.html#DescriptionAndTitleElements

---

**
// remove filetype .svg from filename, replace _ with space and save as title
$intHolder = strlen($ourFileName);
$intHolder = ($intHolder - 4);
$id=substr($ourFileName,0,$intHolder);
$title=preg_replace("/_/"," ",$id); 
$data='<title>'.$title.'</title>'
...

A non-ideal but practical and useful batch method is to use the filename replace any _ or - etc with a space as in: 
"Struthious_Bandersnatch_Emperor_penguin_chick_(head).svg"

<svg ...>
<title>Struthious Bandersnatch Emperor penguin chick (head)</title>
<metadata id="metadata3248">
...
...
Comment 1 Tollef Fog Heen 2010-08-18 03:24:05 UTC
Closing all openclipart bugs as openclipart is now on launchpad, as per request from  Jon Philips.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.