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

Incorrect role on <dd> element on "On this page" component #1998

Closed
2 of 6 tasks
laflannery opened this issue Aug 14, 2023 · 5 comments · Fixed by department-of-veterans-affairs/component-library#1346
Closed
2 of 6 tasks
Assignees
Labels
a11y-defect-3 Medium-severity accessibility issue that should be fixed within 1 - 3 sprints accessibility Any Section 508 or accessibility issue bug Something isn't working platform-design-system-team va-on-this-page DS On this page component

Comments

@laflannery
Copy link

laflannery commented Aug 14, 2023

Bug Report

  • I’ve searched for any related issues and avoided creating a duplicate issue.

What happened

The "On this page" component has a role="definition assigned to the <dd> element:
image

I am asking that

  1. If there is a very good reason we are using the definition list markup:
    • The role be removed from this element because:
      • As with all ARIA, we do not want or need to use a role when a semantic element is available
      • Also, because we are using a role that is not aligned with the semantic element we are using, the implicit value of the element is changing and this is being flagged as an error in AMP as an incorrect element being used within the <dl>
        image
  2. However, this markup seems complex for this, it's just a navigation element and there doesn't seem to be a reason why this wouldn't just use a simply list markup.
    • Recommendation to update this to a typical list markup and remove the definition list entirely

What I expected to happen

I would expect the markup to use only expected elements and to use the least complex markup appropriate for the content and information you are trying to convey

Reproducing

  • Formation version:
  • Device: (e.g. iPhone 8, Macbook)
  • Browser: (e.g. Firefox, IE 11)

Steps to reproduce:

Urgency

How urgent is this request? Please select the approriate option below and/or provide details

  • This bug is blocking work currently in progress
  • This bug is affecting work currently in progress but we have a workaround
  • This bug is blocking work planned within the next few sprints
  • This bug is not blocking any work
  • Other

Details

@caw310
Copy link
Contributor

caw310 commented Jul 2, 2024

@jamigibbs
Copy link
Contributor

jamigibbs commented Jul 3, 2024

I think I agree with @laflannery about the existing dl markup. Looking over MDN, the description list doesn't seem appropriate. Maybe it was initially done that way because it could maybe be described as a glossary? But that doesn't seem exactly right for this use case either. Unfortunately I could not find any details about it when it was created so I'm not sure the original reason.

Here are the guidelines for nav which can contain any type of markup but a list is probably best here.

@humancompanion-usds humancompanion-usds added the accessibility Any Section 508 or accessibility issue label Aug 8, 2024
@rsmithadhoc rsmithadhoc added the a11y-defect-3 Medium-severity accessibility issue that should be fixed within 1 - 3 sprints label Aug 9, 2024
@Andrew565 Andrew565 self-assigned this Sep 27, 2024
@Andrew565
Copy link
Contributor

My plan is to convert this component to use a UL and LI elements.

@laflannery
Copy link
Author

@Andrew565 Thank you so much for completing this, it's going to be so helpful with the AMP scans! For my purposes and so I can pass it along to others, do you know when this will be released to production?

@Andrew565
Copy link
Contributor

We're in process to get it out to production tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y-defect-3 Medium-severity accessibility issue that should be fixed within 1 - 3 sprints accessibility Any Section 508 or accessibility issue bug Something isn't working platform-design-system-team va-on-this-page DS On this page component
Projects
None yet
6 participants