Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

508-defect-3 [SEMANTIC MARKUP]: Radio inputs with the same name attribute value MUST be part of a group #9174

Closed
jenstrickland opened this issue May 15, 2020 · 2 comments
Assignees
Labels
508-issue-semantic-markup Non-semantic or invalid markup - https://www.w3.org/TR/WCAG20-TECHS/G115.html 1010-team 10-10 Team a11y-defect-3 Medium-severity accessibility issue that should be fixed within 1 - 3 sprints accessibility vsa Work associated with the Veteran-facing Services Applications contract

Comments

@jenstrickland
Copy link
Contributor

jenstrickland commented May 15, 2020

508-defect-3

Feedback framework

  • ❗️ Must for if the feedback must be applied
  • ⚠️Should if the feedback is best practice
  • ✔️ Consider for suggestions/enhancements

Description

Radio inputs that have the same name value must be part of a group, ensuring related <input type="radio"> elements have a group and that the group designation is consistent. Fieldset contains unrelated inputs.

The "Learn more about Medicaid" show/hide <button> must not be in a fieldset.

Recommendation for the Caregiver team

The health care coverage program learn more should be moved back to above the form into a Learn more show/hide. There is a forms system issue, where the <button> cannot be in a <fieldset>, so these toggles need to be changes to <a href… and JavaScript added to support that behavior. For sake of scalability and maintenance, this is the responsibility of VSP to create a forms system component.

Additional issues to be addressed in the forms system: Update the Additional Info component to be used for Learn More expandable sections in forms #4330

Point of Contact

VFS Point of Contact: Jennifer

Acceptance Criteria

  • As an assistive tech user, I want form checkbox and radio inputs to be matched with the related input and group labels.

  • As a screen reader user, I want to digest the content of the page with minimal repetition and extraneous noise.

Environment

  • Operating System: all
  • Browser: all
  • Server destination: staging

Steps to Recreate

  1. Enter https://staging.va.gov/caregivers/primary-3 in browser
  2. Navigate to the healthcare coverage screen
  3. Run an axe-coconut browser scan
  4. Verify the issue "Radio inputs with the same name attribute value must be part of a group" is listed, associated with <input type="radio" id="root_primaryMedicaidEnrolledYes" name="root_primaryMedicaidEnrolled" value="Y">

Possible Fixes (optional)

Current code

<form class="rjsf" novalidate="">
  <div>
    <div class="input-section schemaform-field-container">
      <div class="schemaform-block-header">
-   <!-- this is the heading level issue -->
-       <h5 class="vads-u-font-size--h4">Health care coverage</h5>
        <div class="vads-u-margin-bottom--4 vads-u-margin-top--2">
          <p>Please complete the following information about the Primary Family Caregiver’s health coverage.</p>
        </div>
      </div>
      <div>
        <fieldset class="schemaform-field-template schemaform-first-field">
          <legend id="root_primaryMedicaidEnrolled-label" class="schemaform-label">
            Is the Primary Family Caregiver currently in enrolled in Medicaid?<span class="schemaform-required-span">(*Required)</span>
          </legend>
          <div class="vads-u-margin-y--1p5 vads-u-margin-bottom--2p5">
-         <div class="form-expanding-group">
-           <button type="button" class="additional-info-button va-button-link" aria-expanded="false" aria-controls="tooltip-5">
-           <span class="additional-info-title">Learn more about Medicaid<i class="fas fa-angle-down"></i></span>
-           </button>
-           <span id="tooltip-5"></span>
-         </div>
-         </div>
           <div class="schemaform-widget-wrapper">
              <div class="form-radio-buttons">
                <input type="radio" id="root_primaryMedicaidEnrolledYes" name="root_primaryMedicaidEnrolled" value="Y">
                <label for="root_primaryMedicaidEnrolledYes">Yes</label>
                  <input type="radio" id="root_primaryMedicaidEnrolledNo" name="root_primaryMedicaidEnrolled" value="N">
                <label for="root_primaryMedicaidEnrolledNo">No</label>
              </div>
            </div>
            <div></div>
          </fieldset>
        </div>

<!-- etcetera -->
</form>

Recommended code

+ Due to constraints and issues in the forms system, 
+ add a Learn more about health care coverage programs show/hide above the form,
+ and remove the individual Learn more buttons show/hide from within each fieldset

<form class="rjsf" novalidate="">
  <div>
    <div class="input-section schemaform-field-container">
      <div class="schemaform-block-header">
+       <h3 class="vads-u-font-size--h4">Health care coverage</h3>
        <div class="vads-u-margin-bottom--4 vads-u-margin-top--2">
          <p>Please complete the following information about the Primary Family Caregiver’s health coverage.</p>
        </div>
      </div>
      <div>
        <fieldset class="schemaform-field-template schemaform-first-field">
          <legend id="root_primaryMedicaidEnrolled-label" class="schemaform-label">
            Is the Primary Family Caregiver currently in enrolled in Medicaid?<span class="schemaform-required-span">(*Required)</span>
          </legend>
          <div class="vads-u-margin-y--1p5 vads-u-margin-bottom--2p5">
          </div>
           <div class="schemaform-widget-wrapper">
              <div class="form-radio-buttons">
                <input type="radio" id="root_primaryMedicaidEnrolledYes" name="root_primaryMedicaidEnrolled" aria-labelledby="root_primaryMedicaidEnrolled-label root_primaryMedicaidEnrolledYes">
                <label for="root_primaryMedicaidEnrolledYes">Yes</label>
                <input type="radio" id="root_primaryMedicaidEnrolledNo" name="root_primaryMedicaidEnrolled" aria-labelledby="root_primaryMedicaidEnrolled-label root_primaryMedicaidEnrolledNo">
                <label for="root_primaryMedicaidEnrolledNo">No</label>
              </div>
            </div>
            <div></div>
          </fieldset>
        </div>
<!-- etcetera -->
</form>

In a future forms system update, it would be great if it might wrap the radio/checkbox input with the label. This is not being asked of the Caregiver team.

<label for="radioOne">
  <input id="radioOne" type="radio" name="example-radio" />
  <span>One</span>
</label>

WCAG or Vendor Guidance (optional)

Screenshots or Trace Logs

Screen Shot 2020-05-15 at 5 57 49 PM

@jenstrickland jenstrickland added accessibility vsa Work associated with the Veteran-facing Services Applications contract 1010-team 10-10 Team a11y-defect-1 Critical accessibility issue that should be fixed before launch or in the next sprint 508-issue-semantic-markup Non-semantic or invalid markup - https://www.w3.org/TR/WCAG20-TECHS/G115.html labels May 15, 2020
@jenstrickland jenstrickland reopened this May 18, 2020
@jenstrickland jenstrickland changed the title IN PROGRESS [SEMANTIC MARKUP]: Radio inputs with the same name attribute value MUST be part of a group 508-defect-1 ❗ Launchblocker [SEMANTIC MARKUP]: Radio inputs with the same name attribute value MUST be part of a group May 18, 2020
@jenstrickland jenstrickland added a11y-defect-3 Medium-severity accessibility issue that should be fixed within 1 - 3 sprints and removed a11y-defect-1 Critical accessibility issue that should be fixed before launch or in the next sprint labels May 19, 2020
@jenstrickland jenstrickland changed the title 508-defect-1 ❗ Launchblocker [SEMANTIC MARKUP]: Radio inputs with the same name attribute value MUST be part of a group 508-defect-3 [SEMANTIC MARKUP]: Radio inputs with the same name attribute value MUST be part of a group May 19, 2020
@ala-yna
Copy link
Contributor

ala-yna commented Oct 2, 2020

Hi @jenstrickland - this series of questions is no longer a part of the form. Should we close the issue?

@jenstrickland
Copy link
Contributor Author

Yes! I noticed this in a recent flow through the app. What a wonderful resolution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
508-issue-semantic-markup Non-semantic or invalid markup - https://www.w3.org/TR/WCAG20-TECHS/G115.html 1010-team 10-10 Team a11y-defect-3 Medium-severity accessibility issue that should be fixed within 1 - 3 sprints accessibility vsa Work associated with the Veteran-facing Services Applications contract
Projects
None yet
Development

No branches or pull requests

3 participants