Skip to content

Include additional metadata for incomplete color-contrast issues when blocked by a pseudo element #3446

@scurker

Description

@scurker

When an incomplete color contrast is blocked by a background image, there's some additional metadata included in the node result:

nodes: [{
  any: [{
    data: {
      contrastRatio: 0,
      expectedContrastRatio: "3:1",
      fgColor: "#000000",
      fontSize: "36.0pt (48px)",
      fontWeight: "normal",
      messageKey: "bgImage"
    }
  }]
}]

However, when an incomplete color contrast issue is blocked by a pseudo element, the node result's data is mostly empty:

data: {
  messageKey: "pseudoContent"
}

axe-core should still include any additional information that can be reasonably included so that data can be used for other things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    color contrastColor contrast issuesfeatNew feature or enhancement

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions