On Thu, 17 Aug 2006 04:36:30 -0000 "mindlace" <[EMAIL PROTECTED]> wrote:
> > Gentlebeings, > > I was excited about the notion of widgets; indeed it was one of the > primary things that induced me to start developing against the alpha > release rather than the production release. > > Unfortunately, as implemented they're completely useless to me, > because of accessability issues and the, pages-as-python-code idea > that seems to be at the center of them. > > Accessibility means I have to guarantee that all of the pages I > generate are accessable. This means that either the widget framework > has to completely adopt accessability - something that's likely > impossible - or it has to make it so that I can accessable-ify the > widgets easily. > > To be fair, the widgets go a reasonable length towards being > accessable, by having label elements and the like. Unfortunately they > don't include all the accessability niceties, like longdesc > attributes, the myriad of attributes that make tables accessible, or > much in the way of ensuring that the JS provides meaningful results > to screen readers. > > I was prepared to deal with this; I figured I'd just modify the widget > templates appropriately. This is where I started to run into the > second part of the problem. > > The problem, basically stated, is that it is a mistake to generate > templates in code. The conceit of tg.widgets is that a form or widget > should be created by some python code that 'fills in' the templates. > Examples include setting titles, label values and the like via keyword > arguments to constructor methods. > > This makes things difficult for i18n, painful for collaborating with > designers, and difficult to make accessibility modifications. As a > simple example, if I need to include a longdesc attribute, I need to > override the constructor *and* the template, or I need to override the > template only and provide some other method for filling the attribute, > which makes it even harder to understand where a bit of generated > markup is coming from. > > In my little world, it seems like widgets should be templates (and > yes, the *template* should contain js, css, error messages, alternate > versions, etc) with python helper code, rather than code that > generates templates. I admit that I won't be able to help much on > this end for a while, but I wanted to get the idea out there while > widgets were not quite frozen in their approach. > > Thanks for hearing my kvetch, > > ~ethan fremen Could you not use the params variable? I assume the longdesc parameter is simple (store value and display as an attribute of the widget). Adding a longdesc parameter and updating the params list and changing the template is probably good. Also, widgets aren't just the standard library, widgets are a method of moving around js, css, error messages, etc. Write your own if the ones that currently exist don't serve your needs. You can choose not to use any of the ones you just complained about. Jason
signature.asc
Description: PGP signature

