[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV ISMAP/USEMAP alt text
From: |
Foteos Macrides |
Subject: |
Re: LYNX-DEV ISMAP/USEMAP alt text |
Date: |
Tue, 08 Apr 1997 19:31:07 -0500 (EST) |
Klaus Weide <address@hidden> wrote:
>On Mon, 7 Apr 1997, Foteos Macrides wrote:
>[...]
>> If Klaus' patch is used, it needs code to eliminate the
>> associated Anchor for the server-side imagemap, and not yield a
>> dangling link when links_are_numbered is ON.
>
>(I assume with "dangling" you mean just that it is not selectable
>because it has zero-length text. If there is something left dangling
>in some other sense, pointing to nothing or similar, please clarify.)
>
>Yes, it is ugly to have that numbered link without being able to select
>it (other than by its number) and without indication what it is.
>But having just "[ISMAP]" and no way to change it is also ugly..
>I think default strings like "[IMAGE]" or "[LINK]" make some sense
>to a user who doesn't know any HTML (as long as he knows the English
>words), but "ISMAP" doesn't.
>
>If "code to eliminate the ... Anchor" means diving into GridText's
>(etc.) form handling code and adding yet more special treatments
>there, then I cop out at this point. Better to retract my patch then,
>unless somebody else wants to do that.
Try adding the stuff indicated by my comment in GridText.c:
[...]
PUBLIC void HText_endAnchor ARGS1(
HText *, text)
{
TextAnchor * a = text->last_anchor;
if (a->number) {
/*
* If it goes somewhere...
*/
a->extent += text->chars + text->last_line->size - a->start;
if (a->extent <= 2) {
/*
* Might be a blank anchor from an ALT="" or an
* ignored ISMAP attribute due to a companion
* USEMAP. - FM
*/
int j;
a->show_anchor = NO;
for (j = (text->last_line->size - a->extent);
text->last_line->data[j] != '\0'; j++) {
if (!IsSpecialAttrChar(text->last_line->data[j])) {
a->show_anchor = YES;
break;
}
}
/*
* If links are numbered and a->show_anchor is still NO,
* get rid of the numbered bracket and adjust the
* anchor count. This code could fail if the anchor
* content caused a wrap, but that's highly unlikely,
* so for now, we won't check for that. - FM
*/
if (a->show_anchor == NO && keypad_mode == LINKS_ARE_NUMBERED) {
j = (text->last_line->size - a->extent - 1);
if (j > 2 && text->last_line->data[j] == ']') {
j--;
while (isdigit((unsigned char)text->last_line->data[j]))
j--;
if (text->last_line->data[j] == '[') {
text->last_line->size = j;
text->last_line->data[text->last_line->size] = '\0';
a->number = 0;
text->last_anchor_number--;
}
}
}
[...]
Although you used Hiram's suggestion to revive the link for
the server-side map if clickable_images is toggled ON, I don't see the
reasoning behind that. The image applies to both the client-side MAP
and the server-side link (i.e, there's just one image, that a GUI would
have inlined, but Lynx needs to pass to a helper app or download when
clickable_images is toggled ON and its link is activated). Don't you
want a configuration option, and command line toggle (and someday a
.lynxrc 'o'ption, when there's room for one 8-) for whether or not to
make the server-side link shown and activatable when a client-side
MAP is present? Whatever that choice is should apply whether or not
clickable_images is ON?
Fote
=========================================================================
Foteos Macrides Worcester Foundation for Biomedical Research
address@hidden 222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;