Forums

Posting in these forums is disabled. These forums will be available for archive purposes. Please join the new forums at the links below:

  • yui-support - replaces the `YUI 3.x` and `YUI 3 Gallery` forums.
    We have created the following discussion categories within this group to aid discoverability for these most-used topics:
    • Charts for YUI Charts support.
    • DataTable for YUI DataTable support.
    • Gallery for YUI Gallery support, including support for published Gallery components as well as the Gallery process in general.
    • Tools for support of YUI’s suite of developer tools such as selleck, shifter, grover, yogi, etc.
    • Everything Else for questions that don’t fit one of the categories above, we’ve got you covered here.
  • yui-deprecated - replaces the `YUI 2.x` forum and the forums of other deprecated products (`YUI Doc`, `Builder`, `YUI PHP Loader`, etc.).
  [ 3 posts ]
New Topic | Post Reply | Print view
Previous topic | Next topic

Jeff Flesher

  • Username: jflesher
  • Joined: Thu Sep 03, 2009 11:19 am
  • Posts: 17
  • Location: USA
  • Offline
  • Profile
Tags:
  • html tag
  • problem
  • w3c validation
  • widget

w3c validation fails

Post Posted: Tue Nov 03, 2009 12:25 pm
+0-
First off, nice Widget, I just have one problem with it; it fails w3c validation.

I have two threads on this issue that might be of some interest:
http://yuilibrary.com/forum/viewtopic.php@f=18&t=1520&p=4849#p4849
http://www.webproworld.com/search-engine-optimization-forum/93667-w3c-validation-yui-widgets.html#post475741

I'm asking questions about a standard way or best practise for doing this; I believe that to make it easy on the end user, it must be done in a way that is consistent in the YUI community; which is not the case now; with 3.x so new; I think now is the time to set a standard for this. By far this best way; would be to get W3C to fix their test, I'm willing to ignore the validation error for now, HTML 5 will one day be the standard and one day will pass the validation test. This way I can say that we should standardize and use the "data-", a HTML 5 standard http://dev.w3.org/html5/spec/Overview.html#custom-data-attribute, in this case "data-yui-config" or something to that effect will work.

Now what I meant as far as best practices; how to format the parameters in a standard way:
This code is easy for a javascript programmer to use; but for an end user, it is a foreign language; I would ask that we follow the HTML 5 standard to the tee; such that this code would be written:


yuiConfig='{"alwaysVisible":true, "contentHeight":{"method":"fixed", "height":150}}'>

To

data-alwaysvisible="true" data-content-height-method="fixed" data-content-height="150"


One problem I see in using Widgets is the end users ability to post JavaScript in Content Management Systems (CMS), it is clear that the CMS needs to be more flexible in allowing Widgets to run, this is of course another topic; but one that we need to keep in mind; not many end users can post JavaScript or even know how; so its up to the CMS to provide these tools and the Widgets designers to make them easy to use from a pure HTML solution.

By the way; I was not picking on your code in my post; I was using it as an example to get my point across; its clear I'm not doing that very well.
Jeff
http://vetshelpcenter.com/

Iliyan Peychev

YUI Contributor

  • Username: peychevi
  • Joined: Tue Feb 24, 2009 12:38 pm
  • Posts: 136
  • Location: Varna, Bulgaria
  • Twitter: ipeychev
  • GitHub: ipeychev
  • Gists: ipeychev
  • Offline
  • Profile
Tags:
  • attribute
  • event
  • github
  • html tag
  • problem
  • w3c validation
  • widget

Re: w3c validation fails

Post Posted: Wed Nov 04, 2009 6:44 am
+0-
Jeff,

jflesher wrote:
First off, nice Widget, I just have one problem with it; it fails w3c validation.

Setting config parameters via custom attribute is optional, not mandatory.
You have two more options:
1. Use "class" attribute - see here: http://ipeychev.github.com/yui3-gallery/gallery-accordion/build_from_markup.html.
2. Subscribe to "beforeItemAdd" event and set your config parameters in the callback.

jflesher wrote:
yuiConfig='{"alwaysVisible":true, "contentHeight":{"method":"fixed", "height":150}}'>

To

data-alwaysvisible="true" data-content-height-method="fixed" data-content-height="150"


That is a good suggestion and I will implement it in the next version.
In this way, the developer will have one more option when creating markup.

Iliyan Peychev

YUI Contributor

  • Username: peychevi
  • Joined: Tue Feb 24, 2009 12:38 pm
  • Posts: 136
  • Location: Varna, Bulgaria
  • Twitter: ipeychev
  • GitHub: ipeychev
  • Gists: ipeychev
  • Offline
  • Profile
Tags:
  • attribute
  • number

Re: w3c validation fails

Post Posted: Mon Nov 09, 2009 9:02 pm
+0-
Version 1.06 has been released.

You may use "data" attribute in order to set the following parameters:
  • data-label - string, for example "Label 1"
  • data-expanded - "true", "yes" or "1"
  • data-alwaysvisible - "true", "yes" or "1"
  • data-closable - "true", "yes" or "1"
  • data-contentheight - "auto", "stretch" or "fixed-X", where X is a number
  [ 3 posts ]
New Topic | Post Reply | Print view
Previous topic | Next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum