Sitepoint Members,
I got this message from W3C: assumes that the user will click on a specific area of an image, which is not possible on many mobile devices. Replace the image map by another input mechanism (e.g. a list of links).
What is the best way to handle this for mobile devices? Just have a link “Mobile” going to the same place as the image?
It seems like you are talking about image maps and instead of area and map co-ordinates you could instead place absolute anchors over the image to allow parts of the image to act as links to different places. The only drawback is that you have to use rectangular areas.
We’d probably need to see an example of what you are trying to do to be sure.
It’s just an image, 'not sure why they’re calling it an image map. For mobile devices, if programmers aren’t using image links, what other links (“input mecanisms”) are there besides text links?
This all of what is written in their validator results.
An input element with type attribute set to “image” is present. Why?
input type=‘image’ assumes that the user will click on a specific area of an image, which is not possible on many mobile devices. How? Replace the image map by another input mechanism (e.g. a list of links).Where <input alt="No sign up." name="submit" src="/pp.png" type="image" />
I never use those anyway. Just use a normal submit button (input type=“submit”) with a background image applied (or use button type=“submit” if more complicated styling is required).
.submit{
margin:0;
padding:0;
border-radius:0;
border:none;
width:100px;/* size to fit*/
height:25px;/* size to fit*/
display:inline-block;
vertical-align:middle;
background:url(images/example.png);
text-transform:capitalize;/* old ie fix*/
text-indent:-999em;/* hide text if needed*/
overflow:hidden;
}
Ok. I thought the cde was for "(or use button type=“submit” if …) " When I read “Just use a normal submit button (input type=“submit”) with a background image applied” it sounded like it woud be a couple of lines of common code.