Skip to content

Improve heading order on Two-Factor Authentication settings page

When reviewing Delete OTP authenticator without affecting WebAuthn, I've noticed some accessibility violations:

  1. Headings of the section are all h4, even though there is no h1, h2 or h3. They should all be changed to h2 with one of the gl-text-size-h* classes for styling purposes.
  2. The page is missing h1 heading. The copy could be "Two-Factor Authentication" to mach the breadcrumbs.

Changes should be included in: https://gitlab.com/gitlab-org/gitlab/-/blob/22df0c739b39d635e779f94d50e1b6220cab7a0c/app/views/profiles/two_factor_auths/show.html.haml

I also recommend adding the accessibility check to the feature spec to ensure there's no regression in the future.

Results of accessibility audit scan:

Screenshot_2024-09-26_at_11.28.23