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

svg-img-alt issue text in axe DevTools extension is misleading #3175

Closed
goodwitch opened this issue Oct 1, 2021 · 4 comments
Closed

svg-img-alt issue text in axe DevTools extension is misleading #3175

goodwitch opened this issue Oct 1, 2021 · 4 comments
Labels
needs discussion More discussion is needed to continue rule metadata Issues in the rule metadata code (lib/rules)
Milestone

Comments

@goodwitch
Copy link
Contributor

Product: axe DevTools Pro Extension

Actual/Problem

axe DevTools Pro throws a real issue about SVG missing alt, but the wording of the issues is VERY misleading.

Current issue text displayed in axe DevTools Pro: "svg elements with an img role have an alternative text"

Expectation:
When in reality...this should say: "svg elements with an img role MUST have an alternative text"

How to Recreate
This rule is https://dequeuniversity.com/rules/axe/4.3/svg-img-alt

You can see this problem in real life by

  1. running axe DevTools Pro on this page: https://www.venetianlasvegas.com/restaurants/brera-osteria.html
  2. look for this issue in the results "svg elements with an img role have an alternative text" (I find 6 of them today)
  3. notice that this issue isn't explaining the problem. following the pattern of the other issues (that you can see in the screenshot)...this issue needs to be changed to either:

svg elements with an img role MUST have an alternative text
OR
ENSURE svg elements with an img role have an alternative text

Screen Shot 2021-10-01 at 9 56 55 AM

Motivation: Having an accurate issue short name will help users of axe DevTools Pro focus on fixing the problem...instead of confusing them.

axe-core version: 4.3.3
axe DevTools extension version: 4.17.1

Browser and Assistive Technology versions

For Tooling issues:

  • Platform: Mac OS 11.6
  • Browser: Chrome v94
@straker straker added the rule metadata Issues in the rule metadata code (lib/rules) label Oct 1, 2021
@straker straker added this to the Axe-core 4.4 milestone Oct 1, 2021
@straker straker added the good first issue For first-time contributors label Oct 1, 2021
@straker
Copy link
Contributor

straker commented Oct 1, 2021

Thanks for the issue. Just need to update the rule metadata help text with the additional wording.

@WilcoFiers WilcoFiers added needs discussion More discussion is needed to continue and removed good first issue For first-time contributors labels Oct 4, 2021
@WilcoFiers
Copy link
Contributor

Thank you for the feedback @goodwitch. This rule is written in an "expectation" style. This is the same way that WCAG requirements are written "Non-text content has an accessible text". The ACT rule which this is based on has a similar title "svg element with explicit role has non-empty accessible name".

Unfortunately, axe-core has gotten a little inconsistent about whether to use requirement-style or expectation-style rule descriptions. I personal tend to favour expectation-style for a variety of reasons:

  1. These terms are commonly used from RFC2119, where they mean different things from how we'd use them.
  2. Because the way we're using "must" is inconsistent with how it's used in WCAG. WCAG success criteria aren't a "must", they "should" be followed, except if there is a conforming alternative version. The only thing that's a "must" are the non-interferance SCs.
  3. Our "should" conflicts with what WAI-ARIA says is a "must".
  4. It's shorter
  5. WCAG success criteria are written in expectation-style
  6. ACT rule titles are written in expectation-style

We'll discuss how to go about this. I can certainly see why expectation-style might be confusing, but I disagree that it's misleading. If anything, putting "must" in the description seems misleading.

@goodwitch
Copy link
Contributor Author

@WilcoFiers I'm pointing out that the SVG statement is different from all the others (and misleading). Let's see how the others in this screenshot all indicate what is rule has been broken...while the SVG statement acts like having an img role with alternative text is a wrong

  1. Ensure interactive controls are not nested
  2. ARIA attributes must conform to valid values
  3. Frames should be tested with axe-core
  4. Links with the same name have a similar purpose <<< usefully describes the problem
  5. Headings should not be empty
  6. Heading levels should only increase by one
  7. Document should have one main landmark
  8. Ensure landmarks are unique
  9. Zooming and scaling should not be disabled

So...the following short rule description is not structured like all the rest.

  • svg elements with an img role have an alternative text

So...I'll be happy to remove the VERY from this title. But I stand behind that this is a misleading statement (and not in line with the way all the other short issue names are written).

@goodwitch goodwitch changed the title svg-img-alt issue text in axe DevTools extension is VERY misleading svg-img-alt issue text in axe DevTools extension is misleading Oct 4, 2021
@padmavemulapati
Copy link

Verified with the latest code change, (axe-core-develop-branch code dated 15th Sep).
Seeing now the description for svg-img-alt as " elements with an img role must have an alternative text"
instead "svg elements with an img role have an alternative text"

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs discussion More discussion is needed to continue rule metadata Issues in the rule metadata code (lib/rules)
Projects
None yet
Development

No branches or pull requests

5 participants