Open bkjohnson opened 3 years ago
@bkjohnson If there is a heading issue, you can pass a different heading, like an <h2>
instead of an <h3>
and use a CSS class that makes it look like an a header with the <h3>
design if that's what you want. We have those classes for this reason. It happens often
I'm aware of the CSS classes for styling headings as other levels. The issue here is content is being delivered from the CMS that already has this violation. At that point the content build could try to recognize this and replace <h3>
s with <h2>
s where appropriate, but the hope is for the CMS to deliver correct content to begin with.
Also, several months ago I wrote a script to create a list of files where this violation occurs. I've run it sporadically, with the most recent being today. Here are the results:
This is all content that is on va.gov. For example, https://www.va.gov/western-colorado-health-care/work-with-us/internships-and-fellowships/psychiatric-mental-health-nurse-practitioner-residency
Without anything in place to prevent this the number of files with improper content will continue to grow.
@timwright12 Do you have an opinion on this? You've worked with axe rules recently
@noahgelman @bkjohnson I would like to see us start to take some steps to identify and remediate this issue.
Heading order relates to:
If there's even a gray area here related to compliance, we should take steps to try and fix it. This seems like a pretty widespread issue within the site content; if we can work with @cmaeng and the CMS team on a remediation path I think that would be best.
@cmaeng do you think we can all chat about this one? The issue seems to be getting worse with time. cc @timcosgrove
Some more information about heading order: https://www.w3.org/WAI/WCAG21/Techniques/general/G141.html
To facilitate navigation and understanding of overall document structure, authors should use headings that are properly nested (e.g., h1 followed by h2, h2 followed by h2 or h3, h3 followed by h3 or h4, etc.).
cc @mchelen
@timwright12 yup, let's chat. i'll reach out in slack to coordinate. will want to include @timcosgrove @kevwalsh @swirtSJW
@bkjohnson This is great, thanks so much for this data.
Do you mind
We have a sense about where these problems are coming from (My hunch is mostly pages built with the "VAMC detail page" content type, which is used extensively by VAMC editors for content that doesn't have a defined content model, and editors have ability to choose headings in a rich text editor).
We'll need a "how might we" with some hypotheses about what will most quickly move the needle on these, and i'd like to start tracking metrics to see what's working. Here's a POC of what the metrics might be.
In the future, we might want to create charts like this specific to each vector, like per product, per content type, or even per user, if we find that it's a few users who are creating a disproportionate number of these.
FWIW, one hypothesis is that editors think h2 is too big and so they choose h3 for purely aesthetic reasons, without understanding the ramifications.
Release tools action item ticket: https://github.com/department-of-veterans-affairs/va.gov-team/issues/37996
@kevwalsh here's the latest results from the script:
And here's the full output:
heading_order_violations_2022-04-20.txt
I'm not the only one that can run this - yarn list-heading-order-violations
on the find-heading-order-violation
branch will create the list of files.
@bkjohnson - might need a little help understanding two of the entries and where to route them:
FYSA - I've routed these items to the content team for manual remediation:
The others are part of the VAMC product that we will be discussing shortly of a path forward for both educations and (hopeful) some sort of automated remediation/prevention.
I'm also not sure who owns the "session-expired" page, but I would guess the auth team since they redirect to it.
https://staging.va.gov/dst shows the "Veterans Community Care Program Eligibility Tool":
I don't really know anything about this or why "dst" is used, but it wasn't obvious to me why this was in the list. I looked at the markup and saw why the script was flagging it:
Do we know which team owns that codebase for DST? Looking at the content I'm wondering if this is old and crufty, never launched, and needs to be removed or if this is something new. I tried the form and it does nothing.
I don't know who owns that page or if it's old or new.
@bkjohnson @mchelen Update: We're working through a plan for the content that is in the CMS, but the DST page needs to be routed/remediated by another team as it is not in the CMS.
Heading-levels-sliced-and-diced.xlsx
Attaching my slice and dice for different ways to solve this problem.
The DST page is coming from the vagov-content
repo - so it looks like something that's old and can be removed.
transferring this issue over to the va.gov-cms
repo for our new Accessibility Lead, @laflannery , to take a look at.
508-defect-2
User Story or Problem Statement
A CMS content editor adds content to a page using
<h3>
tags as the main non-title content heading. They also check (or don't uncheck) the box that says "Include table of contents". This results in only 1<h2>
being on the page which says "On this page", and this is unexpected behavior. If the box is not checked, then the headings go from<h1>
to<h3>
, which is a problem for screen reader users.Details
Background issues:
Here is a screenshot of part of the content editor experience:
The "component" will only be rendered if data in the content model says to render it.
Based on the documentation for the "On this page" component, it is being used incorrectly on this specific page, and likely others. However, the improper use is due to there being no other
<h2>
elements on the page, which is because of bad content coming from the CMS.Acceptance Criteria
heading-order
issue on the pageheading-order
issueEnvironment
Steps to Recreate
<h1>
, "On this page" is an<h2>
, and "Contact info" is an<h3>
<h3>
elements are children of the<h2>
.Proposed Solution (if known)
Modify the
axeCheck
Cypress command and/or the 16 sitemap tests whereaxeCheck
is being called to:heading-order
rule in thebest-practice
tagexclude
the "On this page" component from the checksIf excluding the component and its
<h2>On this page</h2>
isn't possible, then the design system team will be able to change the component to not render the<h2>
if there are no others on the page, leading to an appropriate failure for the a11y tests.Screenshots or Trace Logs
With the
best-practice
tag enabled the tests are saying that the page is missing an<h1>
, but aren't picking up on theheading-order
issue:https://github.com/department-of-veterans-affairs/content-build/runs/3429054614?check_suite_focus=true#step:9:3990
This may be related to the page being inside of an
<iframe>
in Cypress.heading-order
was getting triggered on other pages though: https://github.com/department-of-veterans-affairs/content-build/runs/3429054717?check_suite_focus=true#step:9:2506