bcgov / bcgov/alcs

Check all buttons for missing `type="button"` or `(click)`

Open
#2,978 0 comments 0 reactions 0 assignees View on GitHub
Task
Dominant language
TypeScript
Stars
10
Forks
0
Avg merge
20h 8m
Merged PRs (30d)
30

Description

Make sure that any `` elements that are not expected to submit a form or have a `(click)` handler are of type "button". This will prevent them from submitting their parent form.

**Purpose**
To prevent unexpected form submits as per #2967

**Acceptance Criteria**
- [ ] Find all `` elements and make sure they have the correct attributes/behavious
- We are looking for a particular situation where a `` element is used, but:
- It has as no `(click)` handler
- The type is not set (or set to `type="submit"`)
- The intent is *not* to submit its form

** Additional context**
- Produced during #2967
- I don't know why this wasn't a problem before, but something in updating Angular from 20 to 21 caused this to work the way it should

Confirm this task meets our team [**Definition of Ready (DoR)**](https://www.figma.com/board/XmNkN600aAVWFCBmSDdt10/Team-Documents?node-id=1-2&t=Xjd6nHZZ7YlnoOrD-4) before moving to the **Next Sprint** column.

Confirm this task meets our team [**Definition of Done (DoD)**](https://www.figma.com/board/XmNkN600aAVWFCBmSDdt10/Team-Documents?node-id=3-21&t=Xjd6nHZZ7YlnoOrD-4) before moving to the **Done** column.

Contributor guide

No contributing guide indexed for this repository

Research direction

Search the repository for every element in the Angular templates and inspect each one against the stated click-handler, type, and form-submit criteria. Confirm that buttons intended only for interaction use type="button", while intentional form submissions remain unchanged; done means no unintended parent-form submissions remain.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.