Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
H
html-validate
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 19
    • Issues 19
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 4
    • Merge Requests 4
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • html-validate
  • html-validate
  • Issues
  • #67

Closed
Open
Opened Feb 13, 2020 by João Pimentel Ferreira@jfoclpf

False negative on wcag/h30

Provide a broad description of the bug.

Reduced test-case

This code is outputting an error wcag/h30

<a alt="close left sidebar" class="btn btn-danger cursor_pointer close" data-action="close" data-side="left">
  <span alt="close left sidebar"></span>
</a>

I have the alt attribute on both the a element and span element, but still the error is being thrown

Configuration

const htmlvalidate = new HTMLValidate({
  extends: ['html-validate:recommended'],
  rules: {
    'no-trailing-whitespace': 'off',
    'attr-case': 'off',
    'long-title': 'off'
  }
})

Expected result

I'd expect no error since alt is provided on a element

Actual result

  {
    ruleId: 'WCAG/H30',
    severity: 2,
    message: 'Anchor link must have a text describing its purpose',
    offset: 6267,
    line: 108,
    column: 22,
    size: 1,
    selector: 'html > body > main > div:nth-child(1) > div:nth-child(1) > div > a',
    context: undefined
  }

Version

  • html-validate: 2.16.0
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: html-validate/html-validate#67