Accessibility fixes - TDD - String calculator functionality #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Accessibility Improvements for String Calculator
What did you do?
This PR implements comprehensive accessibility improvements following WCAG guidelines and best practices, using strict Test-Driven Development (TDD).
Accessibility Enhancements:
<button>element for the Calculate button<label>element associated via htmlFor/id<main>landmark element<form>structure with onSubmit handlerFunctionality Implementation:
stringCalculator.ts//;\n1;2)Testing:
Why did you do it?
These changes were necessary to make the application accessible to all users, including those using assistive technologies.
Accessibility Issues Addressed:
<div>instead of<button>breaks keyboard navigation and screen reader functionalityrole='alert'on static content causes unnecessary screen reader announcements<main>element makes it harder for screen reader users to navigate to primary content<form>, preventing native form behaviorFunctionality Implementation:
Screenshots
Happy case

Error case

Tests
