dequelabs / axe-core

Accessibility engine for automated Web UI testing
https://www.deque.com/axe/
Mozilla Public License 2.0
5.89k stars 771 forks source link

label-content-name-mismatch should ignore SVG titles #4509

Closed WilcoFiers closed 3 months ago

WilcoFiers commented 3 months ago

This shouldn't fail the label-content-name-mismatch rule:

<button aria-label="Options">
  Options
  <svg xmlns="http://www.w3.org/2000/svg" width="15" height="10" viewBox="0 0 15 10" fill="none">
    <title>Caret</title>
    <path d="M13.4862 0.756836L14.9004 2.17104L7.82935 9.24214L0.75825 2.17104L2.17245 0.756835L7.82935 6.41374L13.4862 0.756836Z" fill="black"></path>
  </svg>
</button>
WilcoFiers commented 3 months ago

Actually, turns out we already have an issue open for this: https://github.com/dequelabs/axe-core/issues/4065