Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
08-07-2014, 10:27 PM #1
- Join Date
- Aug 2014
- Thanked 0 Times in 0 Posts
Image Link, focus border around "line", not image
I've been struggling with an issue for a couple of days now and it's finally got me beat.
I have a link which has an internal img element (see below) and I am trying to enable the website to be keyboard friendly.
<a href=""><img src=""></a>
This is obviously not ideal and I want the focus border to surround the whole image. To rectify this I tried giving the <img> a tabindex of "0". This resulted in the border being correctly displayed however, when I press "Enter", the link is not triggered - This seems somewhat obvious as the <img> is not selected not the link.
How do I get the border to surround the image and also trigger the link when "Enter" is pressed?
p.s. The screenshots were done in Chrome but this is also required to work in a slightly older version of webkit.
08-08-2014, 09:59 AM #2
- Join Date
- Mar 2007
- Thanked 2,223 Times in 2,210 Posts
- Blog Entries
Can we have a link to your page?
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)