Should “Sign Up” fields be links or buttons?

Question

I have an element on my page that allows users to sign in to their account. It both takes a user to a new page AND submits a form, so should it be coded as a link or a button?

Answer

For a quick review:

  • Links take users to a new page or location when activated.
  • Buttons trigger an action, such as submitting a form or opening hidden content.

In this case, a "Sign In" component functions as both a link and a button since it has both actions. It is recommended to code "Sign In" or "Log In" components as buttons since they submit information and preform an action. While it isn't incorrect to make this component a link, make sure to be consistent with how you code it; if it's a link on one page, then it should act like a link on a different page.

For more questions related to your site content, contact our team about joining our A11y Partner Program for one-on-one support!

Free Tools to Continue Learning

Accessible Web Company Logo

Accessible Web RAMP

Monitor your website and manage your progress towards WCAG conformance.

Accessible Web Company Logo

Accessible Web Academy

Career specific courses to help power up your accessibility knowledge.