ANDI
ANDI copied to clipboard
There are more ways to define elements as buttons for a website
IANDI.js defines a button as an element that passes this if statement: "if($(this).isSemantically(["button"],"button,:button,:submit,:reset,:image"))"
The w3c site has these links that also define ways to get interactive elements on the site:
- https://www.w3.org/TR/2011/WD-html5-20110525/interactive-elements.html#interactive-elements
- https://www.w3.org/TR/2011/WD-html5-20110525/commands.html#commands
I'm not aware of additional ways to mark up a button.
That ANDI function above would look for:
[role=button], <button>, <input type=button|submit|reset|image>,
I looked at the spec but I am not seeing what you are implying. Can you be more specific?
One example I have found is that the "Menu" button for the boston.gov site is not labelled as a button or a link by ANDI in the lANDI module. It is a label element connected to an input element by its for attribute. The input element contains a type of checkbox. I think that it should be labelled as a button.
A list of things that were said to be able to be buttons are:
- details tag: specifies additional details that the user can open and close on demand
- An input element whose type attribute is in one of the Submit Button,
Reset Button, Image Button, Button, Radio Button, or Checkbox states
defines a command.
- NOTE: This is described in the example above.
- An option element with an ancestor select element and either no value attribute or a value attribute that is not the empty string defines a command.
- A label element that has an assigned access key and a labeled control and whose labeled control defines a command, itself defines a command.
- A legend element that has an assigned access key and is a child of a fieldset element that has a descendant that is not a descendant of the legend element and is neither a label element nor a legend element but that defines a command, itself defines a command.
- An element that has an assigned access key defines a command.