Skip to content

False positives for CJK named anchors #319

Description

@ptmkenny

When running pa11y with htmlcs as the runner, I'm getting this false positive:

Error: This link points to a named anchor "%E3%81%BE%E3%81%A8%E3%82%81" within the document, but no anchor exists with that name.
[htmlcs: WCAG2AA.Principle2.Guideline2_4.2_4_1.G1,G123,G124.NoSuchID](https://squizlabs.github.io/HTML_CodeSniffer/Standards/WCAG2/#sc2_4_1)

Here's the code, produced by Markdown:

<p>Here is a link: <a href="#%E3%81%BE%E3%81%A8%E3%82%81">Go to summary</a></p>
<h2 name="まとめ">まとめ</h2>
<p>Summary</p>

This is a valid link; %E3%81%BE%E3%81%A8%E3%82%81 converts to まとめ, but CodeSniffer can't parse it, so the test fails even though it should pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions