I want the placeholder text in input fields to automatically clear when I select the field
Benefit
So that I can start typing immediately without the extra step of manually deleting placeholder text
Acceptance Criteria
GIVEN I click on an input field with placeholder text,
WHEN the input field becomes active (focused),
THEN any placeholder text should automatically disappear allowing me to type directly.
GIVEN an input field previously clicked becomes unfocused without any user input,
WHEN I click away from the field,
THEN the original placeholder text should reappear in the field.
GIVEN I have partially typed text into an input field and then cleared it,
WHEN I click away from the field making it lose focus,
THEN the placeholder text should reappear indicating the field is empty.
Dependencies
None.
Technical Notes
Implementation should use standard web development practices for managing input focus such as adding event listeners for focus and blur events.
Consider accessibility implications to ensure that changes do not negatively impact screen reader users or those relying on assistive technologies.
Test changes across all supported browsers to ensure consistent behaviour.
Definition of Done
[X] The feature fulfills all acceptance criteria.
[X] The code is reviewed and meets team coding standards.
[X] All unit, integration, and end-to-end tests are passed.
[X] The feature meets accessibility standards set for the project.
[X] The code passes the CI/CD pipeline quality controls (style and linting).
[X] The feature is merged into the main branch.
[X] The feature is deployed and functional in the QA environment.
[X] The feature was demonstrated to the team and accepted by the product owner.
Role
As a assurance case editor
Desired Feature
I want the placeholder text in input fields to automatically clear when I select the field
Benefit
So that I can start typing immediately without the extra step of manually deleting placeholder text
Acceptance Criteria
GIVEN I click on an input field with placeholder text, WHEN the input field becomes active (focused), THEN any placeholder text should automatically disappear allowing me to type directly.
GIVEN an input field previously clicked becomes unfocused without any user input, WHEN I click away from the field, THEN the original placeholder text should reappear in the field.
GIVEN I have partially typed text into an input field and then cleared it, WHEN I click away from the field making it lose focus, THEN the placeholder text should reappear indicating the field is empty.
Dependencies
None.
Technical Notes
focus
andblur
events.Definition of Done