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

New Rule: filename is valid accessible name #1504

Closed
jeeyyy opened this issue Apr 18, 2019 · 5 comments
Closed

New Rule: filename is valid accessible name #1504

jeeyyy opened this issue Apr 18, 2019 · 5 comments
Assignees
Labels
docs Documentation changes wai-tools

Comments

@jeeyyy
Copy link
Contributor

jeeyyy commented Apr 18, 2019

filename-is-valid-accessible-name

This rule checks that image elements that use their source filename as their accessible name do so without loss of information to the user.

Tags

  • wcag2
  • wcag111
  • experimental

Matches

  • any HTML input element with a type of image
  • any HTML element with the semantic role of img,
  • is not aria-hidden.
  • has accessible name.

Checks

all:

  • filename-is-valid-accessible-name
    • incomplete
      • Element does not have an accessible name that serves an equivalent purpose to the non-text content.
    • pass:
      • Element has an accessible name that serves an equivalent purpose to the non-text content.

References:

@jeeyyy jeeyyy self-assigned this Apr 18, 2019
@aellsey aellsey added this to the HTMLTools Sprint 2 milestone Apr 21, 2019
@WilcoFiers WilcoFiers removed this from the HTMLTools Sprint 2 milestone May 8, 2019
@dylanb
Copy link
Contributor

dylanb commented Jun 16, 2019

I suggest that we close this because axe-core does not and cannot infer accurate meaning at this point in time i.e. this rule proposal is out of scope for axe-core

@jeeyyy
Copy link
Contributor Author

jeeyyy commented Jun 18, 2019

@dylanb, we intend to only return incomplete on this rule and not a failure. Perhaps can mark this rule as experimental too.

@dylanb
Copy link
Contributor

dylanb commented Jun 19, 2019

ok, I am worried about noise

@jeeyyy jeeyyy changed the title New Rule: (Proposal) filename is valid accessible name New Rule: filename is valid accessible name Jun 20, 2019
@jeeyyy
Copy link
Contributor Author

jeeyyy commented Aug 19, 2019

Test cases (WIP)

<!-- Pass 1, accessible name, uses filename -->
<img src="https://www.w3.org/WAI/demos/bad/img/w3c" alt="w3c" />

<!-- Pass 2, accessible name, uses filename (along with extension) -->
<img src="https://www.w3.org/WAI/demos/bad/img/w3c.png" alt="Download w3c.png"
/>

<!-- Incomplete 1, accessible name matches file name, but presence of extension in accessible name results in accesible name not describing the image accurately -->
<img src="https://www.w3.org/WAI/demos/bad/img/w3c.png" alt="w3c.png" />

<!-- Incomplete 2, same as above, but different element type -->
<input type="image" src="https://www.w3.org/WAI/demos/bad/before/img/top_weather.gif" alt="top_weather.gif" />

<!-- Inapplicable 1 -->
<img role="presentation" />

<!-- Inapplicable 2 -->
<img style="display:none;" />

@WilcoFiers
Copy link
Contributor

Closing this. ACT has deprecated this rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation changes wai-tools
Projects
None yet
Development

No branches or pull requests

5 participants