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

avoid-inline-spacing should consider the values #3467

Closed
WilcoFiers opened this issue May 19, 2022 · 1 comment
Closed

avoid-inline-spacing should consider the values #3467

WilcoFiers opened this issue May 19, 2022 · 1 comment
Assignees
Labels
ACT Rules fix Bug fixes pr A pr has been created for the issue
Milestone

Comments

@WilcoFiers
Copy link
Contributor

Axe-core should not just look at whether or not !important is used, but also whether or not the value is below the threshold WCAG sets for it. For example the following should not fail the avoid-inline-spacing rule, because 0.15em is sufficient to satisfy WCAG:

<p style="letter-spacing: 0.15em !important">
  The toy brought back fond memories of being lost in the rain forest.
</p>

There are quite a few ACT examples axe-core is getting wrong because it's not considering the value, or how it's set:

@WilcoFiers WilcoFiers added this to the Axe-core 4.5 milestone May 19, 2022
@straker straker assigned straker and dbowling and unassigned straker May 24, 2022
@WilcoFiers WilcoFiers assigned WilcoFiers and unassigned dbowling Jul 5, 2022
@WilcoFiers WilcoFiers added the pr A pr has been created for the issue label Jul 20, 2022
@padmavemulapati
Copy link

Validated with the latest develop branch code base, with the script:

<!-- Letter spacing in style attributes is not !important -->
  <p style="letter-spacing: 0.15em !important">
    The toy brought back fond memories of being lost in the rain forest.
  </p>

  <title>Passed Example 2</title>
</head>
<body>
	<p style="letter-spacing: 0.15em !important">
		The toy brought back fond memories of being lost in the rain forest.
	</p>
</body>
<title>Passed Example 3</title>
<style>
  p {
    font-size: 25px;
  }
</style>

<p style="letter-spacing: 3px !important">
  The toy brought back fond memories of being lost in the rain forest.
</p>
<p style="letter-spacing: 0.1em !important; letter-spacing: 0.15em !important">
  The toy brought back fond memories of being lost in the rain forest.
</p>
<p style="letter-spacing: 0.15em !important; letter-spacing: 0.1em">
  The toy brought back fond memories of being lost in the rain forest.
</p>
<p style="letter-spacing: 0.1em">
  <span style="letter-spacing: inherit !important;">
    The toy brought back fond memories of being lost in the rain forest.
  </span>
</p>
<title>Inapplicanle ex</title>
<p style="position: absolute; top: -999em; letter-spacing: 0.1em !important;">
  The toy brought back fond memories of being lost in the rain forest.
</p>

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ACT Rules fix Bug fixes pr A pr has been created for the issue
Projects
None yet
Development

No branches or pull requests

4 participants