For using custom attributes in HTML, adapt these attributes to conform to the HTML 5 specs on how to handle custom attributes
12424
Reporter: jcuadra
Assignee: jcuadra
Type: SubTask
Summary: For using custom attributes in HTML, adapt these attributes to conform to the HTML 5 specs on how to handle custom attributes
Priority: Minor
Resolution: Fixed
Status: Closed
Created: 2012-12-03 12:01:55.925
Updated: 2013-08-29 14:45:02.841
Resolved: 2012-12-13 17:02:52.619
Description: HTML5 provides support for custom attributes, but the specs define a fixed way to use these. Any attr of this kind should be prefixed with a "data- identifier. (http://dev.w3.org/html5/spec/global-attributes.html#embedding-custom-non-visible-data-with-the-data-*-attributes & http://www.javascriptkit.com/dhtmltutors/customattributes.shtml)
(There are many of these errors on the portal, here is a list of all the possible I could come up with. Fixing this errors will make it better to debug any remaining ones)
Examples in our portal:
Fungi
should be
Fungi
On the replacing part this is a simple change, but might be worth discussing with the responsible developers who are using these attributes, to see if it doesnt break any of their work.
Some changes needed:
*common macro*
http://code.google.com/p/gbif-portal/source/browse/portal-web/trunk/src/main/webapp/WEB-INF/macros/common.ftl
{code:html}
36.
to
36.
{code}
{code:html}
50.
to
50.
{code}
{code:html}
55.
to
55.
{code}
{code:html}
65. ${label}
to
65. ${label}
{code}
*dataset search*
http://code.google.com/p/gbif-portal/source/browse/portal-web/trunk/src/main/webapp/WEB-INF/pages/dataset/search.ftl
{code:html}
83.
{code}
{code:html}
274.
to
274.
{code}
{code:html}
281.
to
281.
{code}
*occurrence detail*
http://code.google.com/p/gbif-portal/source/browse/portal-web/trunk/src/main/webapp/WEB-INF/pages/occurrence/detail.ftl
{code:html}
42.
to
42.
{code}
*species detail*
http://code.google.com/p/gbif-portal/source/browse/portal-web/trunk/src/main/webapp/WEB-INF/pages/species/detail.ftl
{code:html}
323.
to
323.
{code}
{code:html}
418. ${lang.getIso3LetterCode()?upper_case}
to
418. ${lang.getIso3LetterCode()?upper_case}
{code}
{code:html}
429.
to
429.
{code}
]]>
Author: trobertson@gbif.org
Created: 2012-12-03 16:06:58.114
Updated: 2012-12-03 16:06:58.114
Whoever tackles this, please be very careful as these are used in JQuery selectors all over the place, so a global search on *.ftl and *.js will be needed.
Author: jcuadra@gbif.org
Comment: I'll give it a period of grace to see if anybody can tackle any of this issues familiar with them. Whatever is left, I will tackle them, starting next week, doing what you describe, a global search .
Created: 2012-12-03 16:18:03.441
Updated: 2012-12-03 16:18:03.441
Author: fmendez@gbif.org
Created: 2012-12-07 10:35:05.231
Updated: 2012-12-07 10:35:05.231
occurrence_filters.js uses many custom attributes that are not following the HTML 5 recommendation, specifically: data-placeholder, template-filter,input-classes, title, key, data-filter.
data-filter and data-placeholder can keep their names; the others must be changed in both: html and javascript code.
Author: jcuadra@gbif.org
Comment: thanks for the info Fede. I'll start this issue today.
Created: 2012-12-07 10:36:28.825
Updated: 2012-12-07 10:36:28.825