79269601

Date: 2024-12-10 19:56:02
Score: 1.5
Natty:
Report link

Maybe, I should make the whole block aria-hidden and add a visually hidden element instead?

Yes, remove the svg from the accessibility tree and add the word "and" as visually hidden text.

<h2>
  <span class="first-line">
    Deadpool
    <svg width="53" height="64" class="inline" aria-hidden="true">
      <use href="#oleo-ampersand"></use>
    </svg>
    <span class="sr-only">and&nbsp;</span> 
    Wolverine:
  </span> 
  A StackOverflow Example
</h2>
.first-line {
  display: block;
}

Also, notice that I removed the br element after "Wolverine" and instead wrapped they first line of content in a span and gave it a display of block to get the line break you want. In browse mode, some screen readers will announce the heading as if it were two separate headings if you use the br element to force a line break, so this is a courtesy to prevent that.

Reasons:
  • Blacklisted phrase (1): StackOverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Roland McLeod