SSAgov / ANDI

A tool to test web content for accessibility and 508 compliance.
https://www.ssa.gov/accessibility/andi/help/howtouse.html
Other
293 stars 75 forks source link

There are more ways to define elements as buttons for a website #205

Open ollie-iterators opened 1 year ago

ollie-iterators commented 1 year ago

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:

JohnCotterSSA commented 1 year ago

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?

ollie-iterators commented 1 year ago

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.

2023-06-08_10-14-30

A list of things that were said to be able to be buttons are: