Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
scurker opened this issue May 2, 2022 · 2 comments
Labels
color contrast Color contrast issues feat New feature or enhancement

Comments

@scurker
Copy link
Member

scurker commented May 2, 2022

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.

@WilcoFiers
Copy link
Contributor

I think we can do that, at least for some of them. We'll put it on the list.

@WilcoFiers WilcoFiers added this to the Axe-core 4.5 milestone May 4, 2022
@WilcoFiers WilcoFiers added feat New feature or enhancement color contrast Color contrast issues labels May 4, 2022
@scurker
Copy link
Member Author

scurker commented May 4, 2022

For my purposes, the only values I would be interested in would be the expectedContrastRatio and font values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color contrast Color contrast issues feat New feature or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants