0

I'm looking for a solution compatible with as many web browsers as possible including IE 6 and IE 7.

This is the issue. I want to create a simple button so that when someone clicks on it, empty post-data is sent to the server. These buttons prevent robots from accessing the data. For example, I'd have a download huge picture button on a mobile website designed for mobile devices.

Here's the code I generally use:

<form action="http://example.com/path/to/download.php" method="POST">
<input type="submit" value="Download">
</form>

The problem is when I run the code through powermapper sortsite software, it claims I should have a fieldset and legend tag, so my form will then have to look more like this:

<form action="http://example.com/path/to/download.php" method="POST">
<fieldset>
<legend>
Title of entire form
</legend>
<input type="submit" value="Download">
</fieldset>
</form>

But then the area around the download button will look messy since then there will be extra unwanted text above the download button as well as a border, but that's how I can get it to comply to WCAG 1.0 AA 12.3 and WCAG 2.0 A H71 standards.

Is there a way I can format my HTML so it works in older browsers but still sends post based data while complying with the WCAG standards?

I'm not sure about using the button HTML tag because there have been reports about it working incorrectly in some IE browsers. See: What disadvantages are there to the <button> tag?

Community
  • 1
  • 1
Mike -- No longer here
  • 2,016
  • 1
  • 11
  • 26

1 Answers1

0

when I run the code through powermapper sortsite software, it claims

Accessibility tools are free to invent their own rules, but WCAG does not require you to have a fieldset in such situation (except for input[radio] or input[checkbox])

I have not checked the result of powermapper, and it would have been great if you gave the exact error text, but if they require to have a fieldset to satisfy success criterion 3.3.2 then they are misleading, especially with a single button without any input as it would have been necessary in other situations:

In my opinion fieldset is intended to group multiple input fields, and legend is intended to give that group some instructions. In your case, the result of the action is already written in the button text and you have nothing to group.

Now, what is important is changing the "Download" text with something more explicit : "Download this web page in PDF"

Adam
  • 15,932
  • 27
  • 48