Re: no title in ExternalLink

2008-10-28 Thread Steve Swinsburg
I have submitted small patches for both Link and ExternalLink to show  
users how to add in the title attribute themselves, in an attempt to  
improve the Javadocs for the HTML components and hence accessibility.  
More components will follow.


I will close the ticket regarding the additional constructor.

The Javadoc improvement regarding accessibility instruxtions is here:
https://issues.apache.org/jira/browse/WICKET-1899


cheers,
Steve







On 28 Oct 2008, at 16:48, Michael Sparer wrote:



I always go for accessibility and each of my links do have a title  
and I'd be
the last one to say that accessibility (and usability) isn't  
important. But
I think the footprint of the components should be kept as small as  
possible.
It isn't hard to extend them anyway. If you only use titled  
externallinks
(like I do) just subclass externallink and add an abstract method to  
return
the title. This way you're forced to come up with a decent title -  
which in
turn improves accessibility/usability. then you're not tempted to  
use a
default constructor ... well just my two cents - if the JIRA goes  
through,

I'll be fine with it too :-)

Michael


Steve Swinsburg-2 wrote:



Hi all,

I've just noticed a deficiency in the ExternalLink component that
doesn't allow a 'title' field to be set in its constructor. This is a
basic HTML attribute that all links should have (for accessibility  
and

expected behaviour).

Currently this is only achieved by using AttributeAppender and  
setting

the title attribute onto the link component. I propose a new
construcotr that takes the title attribute as a parameter (or the
ExternalLink set a title by default).

I have filed a Jira ticket here:
https://issues.apache.org/jira/browse/WICKET-1878


cheers,
Steve













-
Michael Sparer
http://talk-on-tech.blogspot.com
--
View this message in context: 
http://www.nabble.com/no-title-in-ExternalLink-tp20030239p20211164.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





smime.p7s
Description: S/MIME cryptographic signature


Re: no title in ExternalLink

2008-10-28 Thread Michael Sparer

I always go for accessibility and each of my links do have a title and I'd be
the last one to say that accessibility (and usability) isn't important. But
I think the footprint of the components should be kept as small as possible.
It isn't hard to extend them anyway. If you only use titled externallinks
(like I do) just subclass externallink and add an abstract method to return
the title. This way you're forced to come up with a decent title - which in
turn improves accessibility/usability. then you're not tempted to use a
default constructor ... well just my two cents - if the JIRA goes through,
I'll be fine with it too :-)

Michael


Steve Swinsburg-2 wrote:
> 
> 
> Hi all,
> 
> I've just noticed a deficiency in the ExternalLink component that  
> doesn't allow a 'title' field to be set in its constructor. This is a  
> basic HTML attribute that all links should have (for accessibility and  
> expected behaviour).
> 
> Currently this is only achieved by using AttributeAppender and setting  
> the title attribute onto the link component. I propose a new  
> construcotr that takes the title attribute as a parameter (or the  
> ExternalLink set a title by default).
> 
> I have filed a Jira ticket here:
> https://issues.apache.org/jira/browse/WICKET-1878
> 
> 
> cheers,
> Steve
> 
> 
> 
> 
> 
> 
> 
> 
>  
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/no-title-in-ExternalLink-tp20030239p20211164.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: no title in ExternalLink

2008-10-28 Thread Erik van Oosten

Hehe, that's a nice one too.


James Carman wrote:

Perhaps just a helper method somewhere?

public AbstractLink addTitle(AbstractLink link, IModel titleModel)
{
  link.add(new AttributeModifier("title", true, titleModel));
  return link;
}

  



--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: no title in ExternalLink

2008-10-28 Thread Steve Swinsburg
Yeah you can do that, you can do it heaps of different ways, but why  
not have a title field on an ExternalLink component, its such a basic  
attribute that is being missed. See the thread about Wicket and 508  
compliance.



Steve






On 28 Oct 2008, at 15:03, Erik van Oosten wrote:



The following extends Link to have a title model in the constructor.  
Its easy

to do the same for an ExternalLink.

public abstract class TitledLink extends Link {

   public TitledLink(String id, String title) {
   this(id, new Model(title));
   }

   public TitledLink(String id, IModel titleModel) {
   super(id);
   add(new AttributeModifier("title", true, titleModel));
   }

}



Steve Swinsburg-2 wrote:



Hi all,

I've just noticed a deficiency in the ExternalLink component that
doesn't allow a 'title' field to be set in its constructor. This is a
basic HTML attribute that all links should have (for accessibility  
and

expected behaviour).

Currently this is only achieved by using AttributeAppender and  
setting

the title attribute onto the link component. I propose a new
construcotr that takes the title attribute as a parameter (or the
ExternalLink set a title by default).

I have filed a Jira ticket here:
https://issues.apache.org/jira/browse/WICKET-1878


cheers,
Steve




--
View this message in context: 
http://www.nabble.com/no-title-in-ExternalLink-tp20030239p20208934.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





smime.p7s
Description: S/MIME cryptographic signature


Re: no title in ExternalLink

2008-10-28 Thread James Carman
Perhaps just a helper method somewhere?

public AbstractLink addTitle(AbstractLink link, IModel titleModel)
{
  link.add(new AttributeModifier("title", true, titleModel));
  return link;
}

On Tue, Oct 28, 2008 at 11:03 AM, Erik van Oosten <[EMAIL PROTECTED]> wrote:
>
> The following extends Link to have a title model in the constructor. Its easy
> to do the same for an ExternalLink.
>
> public abstract class TitledLink extends Link {
>
>public TitledLink(String id, String title) {
>this(id, new Model(title));
>}
>
>public TitledLink(String id, IModel titleModel) {
>super(id);
>add(new AttributeModifier("title", true, titleModel));
>}
>
> }
>
>
>
> Steve Swinsburg-2 wrote:
>>
>>
>> Hi all,
>>
>> I've just noticed a deficiency in the ExternalLink component that
>> doesn't allow a 'title' field to be set in its constructor. This is a
>> basic HTML attribute that all links should have (for accessibility and
>> expected behaviour).
>>
>> Currently this is only achieved by using AttributeAppender and setting
>> the title attribute onto the link component. I propose a new
>> construcotr that takes the title attribute as a parameter (or the
>> ExternalLink set a title by default).
>>
>> I have filed a Jira ticket here:
>> https://issues.apache.org/jira/browse/WICKET-1878
>>
>>
>> cheers,
>> Steve
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/no-title-in-ExternalLink-tp20030239p20208934.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: no title in ExternalLink

2008-10-28 Thread Erik van Oosten

The following extends Link to have a title model in the constructor. Its easy
to do the same for an ExternalLink.

public abstract class TitledLink extends Link {

public TitledLink(String id, String title) {
this(id, new Model(title));
}

public TitledLink(String id, IModel titleModel) {
super(id);
add(new AttributeModifier("title", true, titleModel));
}

}



Steve Swinsburg-2 wrote:
> 
> 
> Hi all,
> 
> I've just noticed a deficiency in the ExternalLink component that  
> doesn't allow a 'title' field to be set in its constructor. This is a  
> basic HTML attribute that all links should have (for accessibility and  
> expected behaviour).
> 
> Currently this is only achieved by using AttributeAppender and setting  
> the title attribute onto the link component. I propose a new  
> construcotr that takes the title attribute as a parameter (or the  
> ExternalLink set a title by default).
> 
> I have filed a Jira ticket here:
> https://issues.apache.org/jira/browse/WICKET-1878
> 
> 
> cheers,
> Steve
>  
> 

-- 
View this message in context: 
http://www.nabble.com/no-title-in-ExternalLink-tp20030239p20208934.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



no title in ExternalLink

2008-10-17 Thread Steve Swinsburg


Hi all,

I've just noticed a deficiency in the ExternalLink component that  
doesn't allow a 'title' field to be set in its constructor. This is a  
basic HTML attribute that all links should have (for accessibility and  
expected behaviour).


Currently this is only achieved by using AttributeAppender and setting  
the title attribute onto the link component. I propose a new  
construcotr that takes the title attribute as a parameter (or the  
ExternalLink set a title by default).


I have filed a Jira ticket here: 
https://issues.apache.org/jira/browse/WICKET-1878


cheers,
Steve









smime.p7s
Description: S/MIME cryptographic signature