fix: add aria-live polite region for form submission announcements (#85) - #155
Conversation
|
@vedika76 is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hello @komalharshita , |
|
@vedika76 kindly resolve the merge conflicts before merging |
komalharshita
left a comment
There was a problem hiding this comment.
Thanks for the contribution. Improving loading-state announcements for screen-reader users is a valuable accessibility goal, and adding aria-live support is the right direction conceptually.
However, the current implementation should not be merged yet because it introduces structural duplication and invalid DOM behavior.
Main issues:
- The PR now creates duplicate
id="results-loading"elements in multiple places. - The loading-state markup was duplicated instead of enhancing the existing structure.
- Duplicate IDs can break JavaScript selectors, loading-state synchronization, and assistive-technology behavior.
- Multiple live regions announcing similar content may also create repetitive or confusing screen-reader output.
A cleaner and safer approach would be:
- keep a single unique loading container
- add
aria-live="polite"to the existing status region only - avoid duplicating loading markup
- ensure announcements remain concise and non-repetitive
Please refactor the implementation to enhance the existing loading/error structure instead of duplicating it. Once the DOM structure is corrected and duplicate IDs are removed, the PR can be re-reviewed.
…vedika76/DevPath into fix/aria-live-form-status :wq# the commit. qaqaqa
komalharshita
left a comment
There was a problem hiding this comment.
Thank you for addressing the previous review comments.
I re-checked the updated implementation and the earlier concerns have been resolved:
• The duplicate loading container has been removed.
• The existing #results-loading element is now enhanced with aria-live="polite" and aria-atomic="true" instead of duplicating markup.
• No duplicate IDs are introduced.
• Existing JavaScript selectors and loading-state behavior remain intact.
• The accessibility improvement is implemented in a clean and minimal way.
This is now a focused accessibility enhancement that improves screen-reader announcements without altering existing functionality.
Approved. Nice work refining the implementation based on feedback.
Summary [required]
Added an ARIA live region to the recommendation form to ensure screen readers announce form submission status (loading and error messages), improving accessibility for visually impaired users.
Related Issue [required]
Closes #85
Type of Change [required]
data/projects.jsonWhat Was Changed [required]
templates/index.htmlform-error-generalandresults-loadingelements in a<div>witharia-live="polite"andaria-atomic="true"attributes.How to Test This PR [required]
git checkout fix/aria-live-form-statuspip install -r requirements.txtpython app.pypython tests/test_basic.pyExpected test output:
Test Results [required]
(Screenshot shows here)

27 passed, 0 failed out of 27 tests
All tests passed successfully.
Screenshots (if UI change)
N/A - No visual UI changes, only ARIA attributes added
Self-Review Checklist [required]
fix/aria-live-form-statuspython tests/test_basic.pyand all 27 tests passflake8 .locally and there are no errors (N/A- no python files changed)print()orconsole.log()debug statementsNotes for Reviewer
The issue example suggested one wrapper, but due to the actual file structure (elements in different sections), I added two live regions: one in the form section and one in the results section. Both provide full screen reader coverage.