Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Duplicate IDs Within Components #324

Open
TomAlperin opened this issue Jun 9, 2021 · 0 comments
Open

Duplicate IDs Within Components #324

TomAlperin opened this issue Jun 9, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@TomAlperin
Copy link

Expected Behavior

There should not be any duplicate IDs on any of the component templates.

Actual/Current Behavior

Some components that are being displayed multiple times on a page are using ids on the elements that are not unique. While some browsers will display the page correctly, this can cause unpredictable behavior and may cause incorrect rendering on certain browsers.

A good example of a page that currently has duplicate IDs is the login page. This page contains a "Login" and "Create Account" button. Because these are a reusable component with a static ID set, the IDs are identical.

Screen Shot 2021-06-09 at 1 11 47 PM

Screen Shot 2021-06-09 at 1 11 33 PM

Steps to Reproduce the Problem

  1. Navigate to login page.
  2. Inspect submit buttons.
  3. IDs will be identical for both buttons.

Proposed Fix

Replace all ids with a class. The styles will need to be updated to target the class instead of an id.

@TomAlperin TomAlperin added the bug Something isn't working label Jun 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant