Skip to content

warning for "SVG hyperlinks should have a human-readable title" seems too strict #1353

@pkra

Description

@pkra

Using v5.0.0-beta-2, the following minimal example produces 2 warnings of the following form:

WARNING(ACC-011): [..] SVG hyperlinks should have a human-readable title (using the "title" child element or the "xlink:title" attribute).

This seems overly strict - aria-label and text descendants are valid ways to label a link in SVG.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
  <title>SVG anchor test</title>
</head>

<body>
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
  <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/circle" aria-label="circle">
    <circle cx="50" cy="40" r="35" />
  </a>
  <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/text">
    <text x="50" y="90" text-anchor="middle">text</text>
  </a>
</svg>

</body>
</html>

Metadata

Metadata

Assignees

Labels

status: completedWork completed, can be closedtype: false-positiveThis issue is about valid content being incorrectly rejected

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions