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

Use of multiple <header> tags #1637

Open
mkdir-washington-edu opened this issue Jan 16, 2025 · 0 comments
Open

Use of multiple <header> tags #1637

mkdir-washington-edu opened this issue Jan 16, 2025 · 0 comments

Comments

@mkdir-washington-edu
Copy link

From the HighWire Press / McGraw-Hill Accessibility spreadsheet: https://hypothes-is.slack.com/archives/C8TPC8XMK/p1736535764817829

Highwire Press Reproduction

  1. Navigate to the ""Annotation sidebar"" button and activate it.
  2. Navigate to the ""Orphans"" tab.
  3. Navigate to the mentioned heading text and inspect the code.
  4. Observe there are multiple tags present.

HighWire Expected Result
Only one

tag should be used on the page.

HghWire Actual Result
The

tags is incorrectly defined multiple times on the page for ""DemoAccount"", ""coaltarfreeamerica"", ""DemoAccount"" and so on headings which resulted in a confusing experience for screen reader users. As a best practice page should only have only one tag.

Code Snippet:

<header>
(...)
<h3 class=""text-color-text font-bold"">DemoAccount</h3>(...)
</header>
(...)
<header>
(...)
<h3 class=""text-color-text font-bold"">coaltarfreeamerica</h3>
(...)
</header>

HighWire Rationale
Landmark roles are defined to help users navigate to different sections of a web page quickly. Different user agents provide users with means to navigate to web page landmarks. Landmark roles are defined based on their location on a web page. For example, a web page can have only 1 banner or main landmark.
When landmark roles are not defined correctly, it becomes very frustrating for assistive technology users, such as screen reader users to navigate to different sections of the page quickly. This also leads to a poor user experience for screen reader users and acts as frustration rather than assistance in navigation for them.

HighWire Recommendation
Remove the

element provided in the main content area.

Suggested Code:

<div>
(...)
<h3 class=""text-color-text font-bold"">DemoAccount</h3>
(...)
</div>
(...)
<div>
(...)
<h3 class=""text-color-text font-bold"">coaltarfreeamerica</h3>
(...)
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant