Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ollie-iterators opened this issue Jun 3, 2023 · 2 comments
Open

Comments

@ollie-iterators
Copy link

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
Copy link
Member

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
Copy link
Author

ollie-iterators commented Jun 8, 2023

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:

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants