[dev] Re: [cvs] commit: kronolith month.php [patch attached]

Derek P. Moore derekm at hackunix.org
Fri Nov 26 19:36:45 PST 2004


Quoting Jan Schneider <jan at horde.org>:

> But we don't know what graphic theme designer will use. A plus icon is only
> one option.

Yes, but a '+' is universally understandable as synonymous to "Add", 
and the alt
text is only rendered by the browser when the theme designer's icon can't or
won't be displayed.  So the theme designer's icon is irrelevant.

And with the current UI of Kronolith's Month View, you can't very well render
the text "Create a New Event" in a 16 pixel by 16 pixel float block.  A '+' is
the only via option for Kronolith's current UI.

>> 'alt="+" title="Create a New Event"' makes the most sense overall.
>
> But that isn't possible because all graphics in Horde have alt and title
> attributes the same.

Ah, yes, I see.  When I was looking at the page source for Month View and
thinking about this problem, I forgot about Horde::img()'s API where $alt is
used to populate both the alt and title attributes.

I've attached a patch (img.api.diff) that extends Horde::img()'s API in a
backwards compatible fashion so you can optionally specify alternative 
text for
the title attribute as well.  This was the best way I could think of to extend
img()'s API, I hope it's acceptable.

I've also modified Kronolith in places to make use of the new img() API.

Before applying the patch to Kronolith, go to your browser settings and 
turn off
image loading.  Then surf around Kronolith's different views to see the
inconsistencies of Kronolith's alt texts.  For example, in Month View, 
previous
and next icons' alt texts are "<" and ">", respectively; while
in Week View the alt texts are "Last week" and "Next week".  It's odd that one
view uses angle brackets and another view uses words.  Also, for adding an
event, in Month View it's "+" and in Week View it's "Create a New Event".

The attached Kronolith patch cleans all of this up in a rather nice way.
Now, everywhere uses "<" and ">" as alt text with tooltips of "Last ..." and
"Next ...".  And adding an event is "+" with a tooltip of "Create a New 
Event".

IMP could also benefit from similar consistency changes...  If you guys 
like and
accept this work, I'll send up a patch that "consistencyifies" IMP with 
the new
Horde::img() API.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: img.api.diff
Type: text/x-patch
Size: 1907 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20041126/e446ad23/img.api.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kronolith.diff
Type: text/x-patch
Size: 10008 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20041126/e446ad23/kronolith.bin


More information about the dev mailing list