When using custom attributes in HTML, the HTML5 non-compliant "key" attribute is used in several places. Change this to "data-key" to be HTML5 compliant.
12539
Reporter: jcuadra
Type: Improvement
Summary: When using custom attributes in HTML, the HTML5 non-compliant "key" attribute is used in several places. Change this to "data-key" to be HTML5 compliant.
Priority: Minor
Resolution: WontFix
Status: Closed
Created: 2012-12-13 16:59:03.664
Updated: 2013-08-29 14:45:19.285
Resolved: 2013-03-06 15:45:17.319
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:
*species search*
http://code.google.com/p/gbif-portal/source/browse/portal-web/trunk/src/main/webapp/WEB-INF/pages/species/search.ftl
{code:html}
85. ${classification.get(usageKey)!"???"}
to
85. ${classification.get(usageKey)!"???"}
{code}
*occurrence search*
http://code.google.com/p/gbif-portal/source/browse/portal-web/trunk/src/main/webapp/WEB-INF/pages/occurrence/search.ftl
{code:html}
231.