Problem/Motivation
Accessibility testing revealed a few concerns. The main one is that the form and select elements do not have corresponding labels. This showed in a few different testing tools (WAVE, Lighthouse, SiteImprove). Another concern is about the Add Row link and Calculate button. Though not flagged by testing tools, I noticed when using Voiceover that there is no announcement of what has changed after selecting one.
Steps to reproduce
Check a page using the calculator with an accessibility testing tool like WAVE, Lighthouse, or SiteImprove to see the missing label errors. Use a screen reader such as VoiceOver to note the lack of helpful information upon submission.
Proposed resolution
Though it's not tabular data, formatting the calculator as a table is one way to help fix the missing labels. Using Drupal.announce() could alert users to any page changes after clicking a button.
Issue fork gpa_calculator-3462133
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mariewakeman commentedComment #6
joewhitsittI've been working with mariewakeman off-thread on this and it has turned into a bit of a refactor. To address the accessibility concerns, we started by moving away from the custom js "Add more" inputs and back towards a Form API approach with an AJAX callback. Additionally, the existing JS was not using the Drupal Behaviors attach functionality. The work we have pushed so far is non-functional but is a step forward.
Here is some todo from my perspective:
Comment #7
joewhitsittI think I was able to get it working again, sprinkle in some Drupal.announce and remove the jQuery dependency.
https://git.drupalcode.org/issue/gpa_calculator-3462133/-/compare/2.x......
I think some validation is covered, and it would be nice to confirm the math is right. Interested in input from others.
Comment #10
mariewakeman commentedComment #11
pyrello commentedThis has been tested by multiple members of our team.
Comment #13
pyrello commented