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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve heading semantics #181

Open
pdehaan opened this issue Jul 10, 2018 · 4 comments
Open

Improve heading semantics #181

pdehaan opened this issue Jul 10, 2018 · 4 comments
Labels
Milestone

Comments

@pdehaan
Copy link
Collaborator

pdehaan commented Jul 10, 2018

aXe is telling me on https://metrics.mozilla.com/protected/usage-report-demo/dashboard/user-activity that "Heading levels should only increase by one". I think this is because we have an <h3> 馃憠 <h5>, but not an intermediate <h4> tag.

<h3 id="metrics-heading">Metrics</h3>
...
<h5 class="striped"><span>Yearly Active Users</span></h5>

I reckon we should possibly bump this from an H5 to an H4:

<StripedHeader tag="h5" label={props.title} />

@pdehaan pdehaan changed the title Add GitHub repo link in footer Heading levels should only increase by one Jul 10, 2018
@openjck openjck added this to the M2 milestone Jul 12, 2018
@openjck
Copy link
Contributor

openjck commented Aug 22, 2018

@pdehaan Good catch. Is this the project you're testing with?

@openjck
Copy link
Contributor

openjck commented Aug 22, 2018

I've looked into this a little bit. There are two problems:

  1. Heading levels jump from h3 to h5 on pages that do not have sections
  2. Headings that are display: none (like h3#metrics-heading) are treated as though they do not exist at all

I'll have a commit for #1 in a second. #2 is a little trickier. I think there's value to having markup that isn't shown visually, but axe thinks that such a situation is bad for accessibility.

@openjck
Copy link
Contributor

openjck commented Aug 22, 2018

While fixing #2, I'd like to spend some more time going through the site with HeadingsMap. There are some other minor issues. For example, the headings in the footer are set as h3 which doesn't seem like a good choice.

@openjck openjck changed the title Heading levels should only increase by one Improve heading semantics Aug 22, 2018
@pdehaan
Copy link
Collaborator Author

pdehaan commented Aug 22, 2018

Is this the project you're testing with?

Yes, I use the aXe Firefox/Chrome plugins directly, or sometimes indirectly via the lighthouse or webhint (formerly sonarwhal) scanners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants